I hadn’t run your code, but my educated guess is that the fault in your code flow is that nonces are user specific. While anonymous nonce is possible, it is useless for its purpose because it would be same for all anonymous users.
So there is likely mismatch somewhere and you are trying to use nonce of specific user, while being anonymous.
Related Posts:
- wp_set_auth_cookie() doesn’t work in Ajax call
- WordPress AJAX Login Screen
- Detecting post type within init action
- WordPress Ajax Login without page reload
- How can I automatically login using a URL?
- Ajax function returns -1
- how to use reCaptcha v3 in wordpress custom login form?
- Is it safe to manually sign a user in using AJAX?
- Why a strange discrepency between get_current_user_id() when using AJAX versus output of document.cookie?
- Ajax login without redirect/reload
- Disallow second login session
- Interim-Login form on frontend
- Custom Login with Ajax not working with IE
- jQuery.post returns 0
- Ajax login fails: script sets cookies, but is_user_logged_in() returns false
- WordPress custom ajax login not working on mobile browsers
- Logout and redirect WordPress user id without he refresh the page
- Why use admin-ajax.php and how does it work?
- Using Backbone with the WordPress AJAX API
- WordPress Ajax Data Security
- 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
- add the user name to menu when user is logged in [closed]
- Error 400 bad request using admin-ajax.php
- Setting TinyMCE Content in wp_editor
- Ajax is not working for logged out users
- How to use wp_send_json_error?
- WordPress AJAX Call Not Return Result
- Form data is empty while posting form through ajax using jquery in WordPress
- load next and previous posts by Ajax and URL update
- How do I check if AJAX nonces are implemented correctly?
- Can I fire an add_action hook inside of a function that recieves data via wp_ajax?
- WordPress Ajax Problems
- 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 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?
- infinite-scroll for 2 fixed height containers
- AJAX Call is Only Returning 100 Results from Query
- AJAX and -1 response
- How to make custom button link on the WordPress Admin Bar run by AJAX
- Ways to load admin-ajax faster without initializing all plugins?
- is_single() conditional check inside ajax php function
- WordPress action – Pass arguments into action in an AJAX call?
- Output multi-steps form results in same page
- Full Front End, AJAX comment system and comment reply script
- get_permalink not fetching correct pages
- Ajax not working for certain user roles
- How to perform a frontend HTTP call with AJAX when plugin save the new settings?
- Problem loading ajax in the header
- How to detect if the ajax_query_attachments_args was triggered to set the featured image?
- WordPress ajax response save into database
- How to change request URL?
- Why the wp_localize_script() does not work correct in my case? ( /wp-admin/admin-ajax.php 400 (Bad Request) )
- Automatically refresh div id every 15 seconds with code snippet from .php file
- Zip Files from custom fields
- Prevent AJAX caching from plugin
- Should wordpress nonce be placed in html form or in javascript file
- If I leave out the wp_die() in the testiframe function I get the ‘0’ appended to my output. If I put it in, the page w/ iframe linked to it crashes
- How to run an ajax call in elementor editor
- ERROR while passing data from JS to PHP via AJAX
- 400 Bad Request – Post to admin-ajax.php
- ajax load more instead of pagination
- jQuery AJAX url wit variable
- How to pass array from jQuery to PHP with AJAX in WordPress?
- Ajax call works for logged in users and returns “Bad Request” for guests [duplicate]
- On form submitting, admin-ajax.php shows status as pending
- How to force the admin-ajax.php file to load over HTTPS?
- Unable to ajax request with meta_query
- get_body_class() in ajax envrionment
- Should I edit a user meta field with PUT, PATCH, or POST and WP::Editable
- How To Pass Theme Path In Javascript Ajax to Pass Id On another Page in WordPress Custom Page Template?
- Infinite Scroll
- how to refresh page after user logout with ‘wp_logout_url’?
- Cannot add multiple single images at once
- How to send custom variable in Media Uploader ajax request?
- Session variables lost during Ajax calls – WordPress – Sage Starter Theme
- While doing ajax, WordPress returning internal server error 500 and stating that my theme functions are undefined
- SHORTINIT and sessions
- using Ajax: call to undefined function get_option
- WordPress Pagination with ajax – Dots
- Bad Request when adding new post via ajax form
- How To Pass Ajax Value to PHP Query?
- Ajax load more posts button
- ajax for visitors wordpress
- Access to a data from a response AJAX called in a template file php
- Escaping admin_url output being passed to js (esc_js vs esc_url)
- Uncaught ReferenceError: custom_ajax is not defined
- wp-admin/admin-ajax.php 400 Bad request (chrome console)