WordPress + AJAX

Action wp_ajax Always Returning 0

One of the common reason why this can happen is when the user is not logged in.

Try adding the ff:

add_action(‘wp_ajax_nopriv_extract-files’, ‘extractFiles’);

Also, when you’re using jsonP, you cannot use type POST

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInPrint this pageEmail this to someone

Leave a Reply