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 More Solution customization - Outputting posts from post id´s in variable in WordPress images - Adding graphics to 404.php page in WordPress plugins - Allow a userclass to save a page as a draft - but not publish w/o admin approval in WordPress List Posts of a Custom Post Types Ordered by Terms of a Custom Taxonomy? in WordPress javascript - Comment form validation in WordPress Reffered: https://wordpress.org/