Remove this line
add_action( 'wp_ajax_my_action', 'updateContent' );
Add this two Line
add_action( 'wp_ajax_nopriv_updateContent', 'updateContent' );
add_action( 'wp_ajax_updateContent', 'updateContent' );
hopefully it will solve your issue
https://codex.wordpress.org/Plugin_API/Action_Reference/wp_ajax_nopriv_(action)
Related Posts:
- Using Ajax with a Class file
- Are ‘wp_ajax’ and ‘wp_ajax_nopriv’ exclusive to authenticated and non-authenticated users?
- How to modify wp_ajax function?
- Ajax Request not coming back to class
- wp_ajax action is not running
- add_action(‘wp_ajax_[action name]’, myfunction) problem
- add_action and Ajax
- WordPress Ajax Problems
- Placement of add_action() for ajax callback?
- admin-ajax.php ” Missing argument 2″ warning
- Code run fast on a cronjob but slow with a do_action or ajax call
- WordPress ajax-action how to return content
- WordPress action – Pass arguments into action in an AJAX call?
- why does not work ajax that add_action registered in wordpress
- wp_ajax action is not run when ajax trigger
- Sharing variables in both actions wp_footer and wp_ajax
- Ajax callback not work
- admin-ajax.php calls fail if referrer is sent with 500
- How to run an ajax call in elementor editor
- do_action won’t work in ajax callback
- Ajax call works for logged in users and returns “Bad Request” for guests [duplicate]
- Its possible to ajax update the content of the admin custom post type list
- Why function called by admin-ajax executes synchronously?
- where does my function output from load-* go?
- Static var overwritten with WP AJAX action, works fine without AJAX
- add_action(‘wp_ajax_[action name]’, myfunction) problem
- SSL breaks customizer: page isn’t returned from ajax
- Stop admin-ajax?
- Is it safe to assume that a nonce may be validated more than once?
- How to verify nonce from Bulk/Quick Edit in save_post?
- store/cache ajax sent data to avoid repeated request
- wp_ajax_[service] returning 0
- Trying to load content of a post via AJAX
- Insert Post using Ajax
- How can I automatically login using a URL?
- Run again current query via ajax but changing a var
- Problems with creating sortable sections in customizer
- Quick Edit: Selected Custom Taxonomy Not Refreshing After Save
- Filter WP user acf field by ajax
- wp_verify_nonce always returns false when logged in as admin
- Ajax requests with different WordPress Address and Site Address setup
- query vars in url work but not in ajax call
- is_home doesn’t affect content
- How to declare a JS variable in an AJAX call
- is_page() conditional not working inside an AJAX function
- jQuery Ajax passing empty parameters to my function?
- admin-ajax.php slows down, but cant figure out which plugin
- Convert this relative path to absolute
- Load WP content with ajax less server demanding and faster than normal page loading?
- admin-ajax.php slow website, how to fix
- WP Admin AJAX Security – using POST to include a relative URL
- Admin-ajax.php 400 error
- ajax nonce verification failing
- Update get_pages using ajax on form select change
- How to create an ajax endpoint without js?
- get_queried_object_id in AJAX
- Should I check for privileges before hooking into `wp_ajax_$handle` or after?
- Making an ajax request from a different domain
- Images loading over http instead of https
- Ajaxify Form That Submits To Same Page To Display Post Data [closed]
- Pagination Using ajax
- wp_ajax_ works fine but wp_ajax_nopriv_ returns HTML and not calling function
- Why is wp_localize_script returning false?
- Change header.php after ajax call
- Submit Form data to another page via Ajax (WordPress Way)
- Retrieve JSON file from JS trough php
- WordPress – admin-ajax.php returns 502 Bad Gateway [closed]
- Using admin-ajax prevents regular php form submission
- WordPress is creating nonce as a logged in user but verifying it incorrectly
- Send checkbox status with Ajax / JSON and save it
- ajax refresh to display new posts
- wp ajax execution time aborted 30 sec
- Replace link with form to pass variables to javascript / ajax
- Can I use application/json content type in WordPress
- How to pass value from ajax to php in no conflict mode?
- What is the relationship between UFW (firewall) being enabled and cron job running?
- Hook after all metadata are set is triggering several time
- check_ajax_reffer not working when logged
- Ajax call on class returns old data
- how to enable ajax on submitting of contact form 7?
- delete post meta data in array WordPress
- Using AJAX on Contact-form the WordPress way
- Retrieve Header Background Image with AJAX
- Error while submitting form using AJAX and php
- AJAX call in backend results in empty update_option
- Ajax Comment: Page reloads whenever the comment submission form is reloaded
- 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
- 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
- Add “load more” functionality to an AJAX response
- weird Internal Server Error – no error log produced
- Why are the most recent posts not appearing in a fetch request, unless I’m logged in?
- Successful ajax call returns lots of whitespace and text of code with 0
- How to submit a button automatically after every scheduled hours?
- At what stage does wp_ajax hooks gets applied during WordPress request?