Put the die();
in your function:
add_action( 'wp_ajax_bubbly-upload', 'bubbly_upload_submit' );
function bubbly_upload_submit() {
// generate the response
$response = json_encode( array( 'success' => true ) );
// response output
header( "Content-Type: application/json" );
echo $response;
die();
}
Reference: WordPress Codex, AJAX in Plugins
Related Posts:
- ajaxurl not defined on front end
- Do I require the use of nonce?
- Using Ajax call in jQuery doesn’t work in widget
- Problem with WordPress Ajax form
- Ajax in WordPress – path issue
- wp_insert_post() is returning the correct post ID, no failure, but the post content does not get updated
- How to test nonce with AJAX – Plugin development
- WordPress ajax doesn’t display object method on jQuery .change() function
- how to search users by ajax live search
- adjust section according to country?
- jquery & ajax sending data to php
- Ajax submit result opens in admin-ajax.php
- insert query on a custom table using ajax with jQuery plugin Jeditable
- Ajax: Populate with content from a post’s ID not working – duplicating current page html instead
- Data not insert and update through ajax and jQuery in admin page?
- WP ajax requests not stacking?
- ajax working when function is on child theme but not in plugin page
- Ajax +wordpress onClick link redirect to new page and create html content
- Execute Jquery when a specific page in my plugin is loading
- Get cat parameter from admin-ajax
- Ajax on the Administration Side of plugin – wp_localize_script – how to pass value from JQuery to PHP function in class?
- Ajax on the Administration Side of plugin – returns 0
- Jquery php request is returning a weird result
- WordPress Ajax not returning Response
- Input field duplicates on form submit by jQuery
- wp_ajax add_action fuction won’t fire on custom jQuery action
- Filterable posts using categories
- How to get values from Tinymce visual editor popup?
- defined (‘ABSPATH’) false after AJAX post to other PHP-file
- WordPress function is not called and ajax return 0
- Ajax call not working with
- How to get site homepage from plugin?
- Page reload occurs before request finishes
- getJSON response to PHP
- ajax problems on loading page [closed]
- SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
- Where to store PHP files created by plugin / themes
- Nonces can be reused multiple times? Bug / Security issue?
- Ajax Load More Posts in Category Page
- How to Add a .js file Only in one specific Page Dynamically to Head
- How to trap “Publish” button to check for meta box validation?
- $wp_filesystem returns NULL. What are the dependencies?
- Use js script from one plugin in another plugin
- Plugin Settings not Saving on Ajax re-ordered table
- How to store accumulate multiple option values in a single array using Options_API
- Comment `Reply` link doesn’t work if comments are loaded from ajax
- Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]
- How to retrieve the content (with a specific ID) via ajax by clicking a link tag
- How to speed up admin-ajax.php in wordpress
- include wp-blog-header not working on MAMP
- How can I pass get_the_author_meta(‘user_email’) through the REST API?
- Including the necessary functions for a custom ajax registration form
- get post attachment using ajax
- Display WordPress the_content() via data attributes
- AJAX pagination, update current page
- WordPress custom taxonomy check box to dropdown
- Using color picker in plugin, does input attribute order matter?
- Plugin – Make sure jquery is loaded in my settings page plus my JS file
- Pull GetOption() variable into jQuery dynamically created html
- Make Database query only when option is updated
- Getting a WordPress Debug Strategy
- making a plugin that moves other plugins wp_head actions to wp_footer
- Setting a JSON web token from a secondary api as a secure cookie on WordPress
- Ajax search shows all results when user empties input?
- Why i can’t get custom fields value or post ID via Ajax?
- Get uploaded image and attach it to the new post
- Admin-ajax php not working on new wordpress version
- Add a counter for mouseovers (custom field)
- Accessing an API with jQuery and AJAX
- AJAX request not routing through proxy
- Adding Permalink to Slides with ‘Simple Nivo Slider’ plugin?
- Ajax request sends url rather than data
- How to set variables with AJAX request to use in another function in WordPress
- How to use wp_send_json() and output the value with ajax?
- GET request return value as error instead of success
- Ajax result show in console if is called outside function and not showing in array
- ajax stopped working when not logged in wordpress
- setTimeout not working in jquery
- ajax response strips multidimensional array and unable to decode
- 400 bad request admin-ajax file upload
- wp_ajax_ 400 Bad Request
- update_post_meta Not Processing Array Data (Not Sure What I Am Missing)
- Using AJAX to submit and return data inside the WordPress Plugin Boiler Plate framework
- $_SESSION inside php function executed by AJAX
- Two same AJAX calls – one is working, other doesn’t
- How to call a function from functions.php with ajax?
- Ajax in a class instantiated via shortcode
- WP Ajax on page load not working on bluehost but was working on Godaddy
- WordPress ajax not working in registration
- ajax form with multiple submit buttons and values
- Script work on non logged in user but not work for logged in user?
- Why this plugin is not working?
- Can’t get query string in ajax call
- Cannot echo a JS variable to a jQuery plugin coming from wp_localize_script
- An adiitional function fires on my AJAX submit
- ajax form function error
- How do I use (or mimic) document.getElementById() on a page loaded from WordPress database?
- Jquery post responses 500 error after some time and lastly an 503 error
- Why my admin-ajax url returns 0 even after adding echo and die() at the end of function?
- WordPress plugin boilerplate AJAX functionality