admin-ajax.php 400 bad request – WordPress Development Stack Exchange

Question

I had created the ajax request

add_action('wp_ajax_post_action', 'post_action');

it works fine until some point

(Maybe i installed some plugin, but i had tried uninstall it but cant solve it)

So i try to add

add_action('wp_ajax_nopriv_post_action', 'post_action');

the request work again, but I don’t understand

wp_ajax_nopriv suppose to work for the user not logged in

but i am a logged in user, I tried to logged out then login again, but still need to add “wp_ajax_nopriv” to make it work.

0
mrj1942 6 months 2022-02-11T00:29:41-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse