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]
- Returning a value from a PHP page
- Page Reloads Before AJAX Request Finishes
- Loading jQuery and jQuery plugin script files correctly [duplicate]
- Why is this Ajax not working?
- Stumped – Ajax Response Returns 0
- Check if email address exists front end with AJAX in a plugin
- jquery document ready function not being called [closed]
- Frontend Ajax call not working using wp_ajax, wp_enqueue_script and wp_localize_script
- How do I alter the comment form ‘allowed tags’ text in a plugin?
- Colorbox ajax loading of outside HTML content works perfect on localhost but not on server
- Fetching the value of forms in WordPress AJAX
- Sending jsPDF documents to the server
- Use ajax from function.php
- Ajax return code 400
- doing an ajax request always outputs 0
- Add a row on clicking each post featured image
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- how to add Jquery script to one page?
- include wp-blog-header not working on MAMP
- Any problem in using native jquery ajax style instead of using admin-ajax.php?
- Applying OO patterns and principles to plugin development
- WooCommerce get_price returning wrong price when used via ajax
- Getting the URL of the parent page
- Slow WP_query due to nested wp_query. Need Suggestions
- Woocommerce add to cart quantity buttons with AJAX
- class click counter save number
- Show special field when correct shipping is chosen
- Is there an event or an other method that tells me the preview is loaded?
- .mo translation strings not loading in PHP scripts that handle AJAX calls
- Checking for new message using AJAX and PHP. Server overload?
- How can I pass get_the_author_meta(‘user_email’) through the REST API?
- AJAX request status 200 but no actual “response”
- Create onClick Event to Re-load a Widget
- How to select the contents in the text view textrea in wp_editor?
- Woocommerce checkout update totals with datepicker
- wordpress count link clicks by ip address
- Including the necessary functions for a custom ajax registration form
- ajax, right way to do it and make it works?
- Are there any scripts, classes, and/or functions built-in to WP for a plugin to export/import its saved data from wp_options?
- How to put JQuery/Ajax inside shortcode?
- How can I rewrite a URL to pass requests to a custom method via AJAX? (I can’t use admin-ajax.php)
- How to localize admin.php only once
- Failed to Open Stream: Permission Denied While Writing to an XML File in a WordPress Plugin
- get post attachment using ajax
- Dashboard – get status and position of metaboxes and pass them to ajax method
- Ajax load more posts with multiple tax query
- Using a custom plugin to capture input data via Ajax and PHP
- WordPress Sending data to Ajax with select option
- Ajax loaded form replaces form action with Ajax url
- Create a new post using rest api and save featured image using an external image url
- prevent default not stopping page refresh. Passing form information to and from php with ajax in a wordpress site
- Ajax contact form widget plugin data not insert in database
- Ajax date_query not working past the first iteration
- jQuery selectors for editor elements safe to use?
- Ajax request not sending to server and returning – wp-admin/admin-ajax.php 400
- wp.template() returns tags in Ajax response
- How to get Metabox custom field to show checked if value is updated using post meta query?
- Why ajax doesn’t work on certain wordpress hooks and reload the page instead?
- Display WordPress the_content() via data attributes
- AJAX pagination, update current page
- Storing data in wordpress database from ajax call from different website
- Save Search System
- populate form fields in a loop with ajax
- dynamic dependent select dropdown
- Change “add to cart” button color based on Woocommerce product category [closed]