Function Always Returns 0 If you're getting a “0” as the response from an AJAX call in the admin, it's most likely one of three things: WordPress can't find the function you've hooked. You don't have a wp_die() at the end of the PHP function. The action isn't in the data you're sending to the PHP function.