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’);

When 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

Your email address will not be published. Required fields are marked *