AJAX request on the frontend always returns 0 if user is not admin
As mmm didn’t post an answer but just wrote a comment, here is the answer: As the documentation for wp_ajax states in its notes, the hook only fires for logged in users. If you want to use an ajax call on the frontend for users that are not logged in, you have to use the … Read more