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
- Using Ajax with a Class file
- SSL breaks customizer: page isn’t returned from ajax
- Stop admin-ajax?
- Masking logout URL
- How to verify nonce from Bulk/Quick Edit in save_post?
- store/cache ajax sent data to avoid repeated request
- Serving nonces through AJAX is not refreshing nonce, returning 403 error
- help on wp_editor via ajax load [duplicate]
- Cannot update my options using wp_ajax
- ajax and nonce when JavaScript is in a seperate file
- Prevent wp_debug from polluting ajax within plugin
- How to localize inline script called with ajax
- Conditional Ajax inclusion
- Buddypress ajax problem after adding new groups sub nav [closed]
- Allow AJAX call to other roles than admin
- How to check username availability with ajax at registration
- submitting form via admin-ajax.php returns 0
- Can a wp_nonce created from domain 1 to be verified on domain 2?
- admin-ajax.php slow, how to speed it up?
- How to use several wp_ajax_ functions for different queries?
- Three level taxonomy dropdown frontend
- Unable to parse JSON response from wp_send_json_success [closed]
- How to solve “Updating failed” with 403 Error when trying to save a Site or Post in Gutenberg?
- problem with WordPress ajax
- How to set post_id to 0 when you upload image via Add media button. (async-upload.php)
- How to: PHP Log Out Link?
- Logout users upon login, based on caps/role?
- How to make tabulator ajax call in wordpress?
- How would you update a frontend form with AJAX
- Updating User Meta with Array on Click of Button AJAX
- Why is on status span no search results?
- eventON plugin AJAX call triggers website crash
- Session Experies and Get Logged Out Within Few Minutes
- Radio buttons live refresh in the customizer
- wp_enqueue_script() doesn’t work with AJAX
- Dynamically add more fields/remove last field in a form
- Ajax Request for both logged and non logged users
- Force redirect single.php to index
- Any plugin or Script to integrate ajax selection module into WordPress page
- WordPress Heartbeat API cannot parse data
- WP_Ajax Hook doesn’t execute this PHP code
- How to include php-generated javascript?
- Serve a different theme based on window size
- Ajax function not returning any results
- post values to custom post type which has advanced custom fields
- How to continuously send feedback via AJAX responses to my client?
- get current taxonomy post with ajax
- WordPress Ajax Filter
- wp_ajax handler with multiple class instances
- admin-ajax.php (aborted) error when using jQuery.get
- Storing temporary data for a custom post type
- I get a 0 after the result of my ajax requests
- Not getting an ajax readystatechange on my page
- Add Login and logout buttons to top menu bar
- Problems implementing Load More functionality
- admin-ajax.php error 500
- WordPress Select Option Load Custom Fields
- Add ajax to plugin in admin area
- Search live Ajax
- Using wp_send_json_success instead of $result[‘message’], die, etc
- do_action won’t work in ajax callback
- 400 Bad request while submitting form using AJAX
- AJAX POST Value not being returned – WordPress – AutoTrader API
- Its possible to ajax update the content of the admin custom post type list
- Ajax call on class returns old data
- how to enable ajax on submitting of contact form 7?
- delete post meta data in array WordPress
- Display post thumbnail after clicking on post id with AJAX
- Using AJAX on Contact-form the WordPress way
- Error while submitting form using AJAX and php
- AJAX call in backend results in empty update_option
- How to fetch meta_value and meta_key in matrix after ajax request by post_id
- get_comments() returns empty array if called through AJAX
- Is it a good idea to init ajax functions only while ‘DOING_AJAX’
- Trouble Removing Plugin [closed]
- register_setting and AJAX?
- How to get parent comment’s id?
- ajax response is 0 instead of ‘script’ [duplicate]
- A refreshless WordPress website
- Dynamic dependent select box getting null value
- get_template_part() does not render after the ajax 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