The condition for such hook to fire is quite simple, as per admin-ajax.php
:
if ( !empty( $_REQUEST['action'] ) )
do_action( 'wp_ajax_nopriv_' . $_REQUEST['action'] );
So the likely reasons are:
- You script does not pass action name properly (which is unlikely if exactly same code works for logged in user).
- Action name gets messed up in WordPress by something and it somehow depends on user being logged in.
I’d try to hook into admin_init
and dump all of $_REQUEST
.
Related Posts:
- jQuery’s .on() method combined with the submit event
- Why use admin-ajax.php and how does it work?
- Why is die() used at the end of function that handles an Ajax request?
- Using Backbone with the WordPress AJAX API
- WordPress Ajax Data Security
- Why is a 500 error generated by admin-ajax.php not going into the Apache error log?
- admin-ajax.php doesn’t work when using POST data and Axios
- How do I hook an Ajax request into a PHP callback?
- Gutenberg – how to correctly perform ajax request on backend
- get_template_part execute with ajax
- How to add WordPress nonces to ajax request
- How is it possible that the function of the test page works, but it does not go live?
- How declare Ajax functions ussing SHORTINIT
- jQuery Autocomplete not working with wp_localize_script
- Load custom formatted comment with AJAX: reply link isn’t rendered?
- Is there a way to optimize function that is used for returning data in an ajax-call?
- WP REST API route request explain
- Ajax returning correct data BUT at wrong place
- admin-ajax.php mixed content
- WP-API and Basic Auth returning 403 on POST but not GET
- Is there a hook to process a backbone restful PUT request inside wordpress?
- Check if username exist with AJAX
- How to localized one js file for different actions?
- WooCommerce: Translation lost on AJAX call in Checkout page [closed]
- Async Loading of Custom Posts
- Call javascript function when category was added via ajax
- How to add WP API and JS featured image attachment
- Using AJAX with Forms
- Force redirect not logged in user to (wp-login.php or wp-admin) for specific page
- How to insert a record by clicking on the link using AJAX
- How can I access the Header of and ajax response from the rest API
- Getting back to ajax search results from a page
- Updating a checkbox value to database for specific row in table
- WordPress Ajax Not Working ( Custom Admin page)
- WordPress ajax success response
- Admin WP List Table Columns Missing
- (updated) How to add AJAX error handling to a (fully) custom registration form?
- wordpress admin ajax url rename
- rest_no_route custom route
- Using infinite scroll ajax load more with search parameter
- How get child posts in custom post type by ajax?
- contact form ajax empty response error message
- Cache wp-json/posts without a plugin?
- What is the best way to do MyAjax error and success handling?
- Gravity Forms closes my popup on Validation Error [closed]
- infinite-scroll for 2 fixed height containers
- Attach time/date stamp on add_post_meta
- “Loadmore” button is not working in buddypress [closed]
- Uncaught ReferenceError: the_ajax_script is not defined . How is this not defined?
- infinite scroll not working when logged out
- Right way to include blog-header.php?
- AJAX action through direct link
- Ajax call on new site with jupiterx theme getting 400 response [closed]
- I can’t get a return value from Ajax
- WordPress AJAX return 0 – My case
- Creating an auto result search bar
- update_option is not saving an array, but saving the string ‘Array’
- Ajax call in wordpress not working for subscriber user
- Upload data from weather station to WordPress Website
- Ajax call in WordPress – unable to display the data on the page
- How to reuse get_template_part() containing a simple loop to work with AJAX correctly?
- Need help with ajax
- Using nonce when loading posts with AJAX
- What WP-API authentication method should I use to interact with anonymous / not-logged visitors?
- Tabbed feeds with ajax vs. without on homepage [closed]
- Get title and featured image using Ajax
- javascript onClick update user_meta from jquery.ajax
- How to ignore WP_ERROR caused by “get_the_excerpt” method in an AJAX call?
- My function containing a mysql query launched by ajax is not working in wordpress. What am I missing?
- Updating Jquery object with newly created elements after AJAX call
- Not getting ajax success response on insert/update row to database
- Wp admin ajax load more
- wordpress ajax search posts
- Ajax call from Plugin using Class
- enqueue style using admin-ajax.php
- How to safely pass post_id and user_id via AJAX to the backend (prevent user from changing it via JS)?
- Can’t get next post info with ajax
- How to inject data content from external json into a modal, using UIkit?
- Ajax by worpdress affects called jquery inside template file
- AJAX form not working, still reloads on submit
- Call public static method from ajax ‘wpcf7_mail_sent’ hook
- Update user meta via ajax from frontend, saving issue
- How to get the admin page slug using wp_loaded hook?
- How to paginate Ajax result
- Cannot access class properties from ajax call in wpordrpess
- why is my main.js not loading?
- Having a self updating list
- Enqueue dynamically generated javascript
- First time doing Ajax with WP, how to do it?
- Unexpected WordPress search results
- WordPress Get Header and Footer using in Admin Area
- Tie the sending of an ajax request to WordPress hooks
- AJAX: admin-ajax.php is adding extra content to my script’s response – how to exclude header, footer, etc.?
- ajax page template
- apply_filters, EMBEDS and AJAX not a friends? [duplicate]
- Using Javascript Callback from plugin in a theme
- Why does my Ajax Get request give a 400 bad request?
- Front-end ajax problem all users and guests getting a 302 redirect when accessing wp-admin/admin-ajax.php
- Use Ajax to get an Options Settings Value
- Run PHPMailer function after ajax function completes that adds row to custom table