Horje

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
Reffered: https://wordpress.org/