if the request is from an unauthenticated user, you should use wp_ajax_nopriv_(action)
to call the function, which in your case is:
add_action('wp_ajax_nopriv_cpm_add_update', array($this,'edit_added_people'));
Related Posts:
- Access-Control-Allow-Origin error sending a jQuery Post to Google API’s
- JavaScript implementation of Gzip
- WordPress AJAX with Axios
- Why might a plugin’s ‘do_shortcode’ not work in an AJAX request?
- Get Previous & Next posts by Post ID
- Nonces and Cache
- REST API endpoint for elasticpress autosuggest
- ajax – why multiple calls to wp_create_nonce() return same value?
- AJAX request on the frontend always returns 0 if user is not admin
- Admin Notification after save_post, when ajax saving in gutenberg
- Using ajax on categories and wordpress loops
- WordPress Nonce Issue for Ajax Login and Logout
- How to modify wp_ajax function?
- Vue.js + AJAX Shortcode
- Turn jQuery.ajax() request into XMLHttpRequest (vanilla JavaScript)
- wp_remote_get() to get AJAX url /wp-admin/admin-ajax.php
- Can’t seem to get wp_localize_script to work
- wp_ajax action is not running
- Ajax – gettext without a plugin
- WordPress AJAX calls not detecting language properly?
- AJAX issue – Uncaught SyntaxError when processing Zip File
- wp_verify_nonce doesn’t return true on server when it matches the nonce
- update_user_meta doesn’t work with AJAX
- How do I set the url to make an ajax request for a html document?
- wp-admin AJAX with Fetch API is done without user
- Ajax stops working when logged in?
- WordPress ajax get content post id
- Using wp_handle_upload and media_handle_sideload with ajax
- Populating content dynamically via AJAX and Advanced Custom Fields [closed]
- Create Page With wp_insert_post() and AJAX
- Load ajax if is_home()
- How to know what page is calling admin-ajax.php?
- Populate a Map at The Same Time as showing Posts via AJAX
- wp_localize_script not working on ajax response
- Get wp_title wp ajax
- Why Does WordPress not output admin-ajax.php path by default?
- Ajax custom search not functioning as expected
- Jetpack Infinite Scroll – Add more than 7 posts each time?
- Speed/Performance difference between `wp_ajax` and `init` checks for AJAX/POST requests?
- Test WordPress api with postman
- Remove trailing 0 from function that is used both statically and dynamically
- How to process wordpress ajax call without action parameter?
- How to load next and previous posts by Ajax
- Update attachment metadata fails
- Nonce fails on ajax save
- WordPress ajax works on FF but not on IE & chrome
- Disallow second login session
- WordPress P2 live problem
- All AJAX requests return a 400 error
- Unable to successfully verify nonce
- Create custom POST Method URL
- POST Ajax bad request
- Getting a variable using $post ajax back from php to js response in WP
- AJAX Call – Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- WordPress is Not Setting PHP $_POST on Custom Ajax
- bulk update meta value with ajax
- Ajax for subscibers not working
- javascript ajax and nonce
- Is it possible to determine whether a page is a page template by page_id in ajax call?
- Chained ajax call, second call returns 0
- How to create a form button that executes a function?
- PHP session when called wp_ajax_nopriv
- What exactly does ‘authenticated’ mean for wp_ajax_nopriv?
- Use AJAX in a WordPress Plugin to Get Data From Custom Database?
- Custom RPC end-point security best pratice?
- AJAX – SHORTINIT set to TRUE returns blank
- How to make image in TinyMCE clickable
- How to use Jeditable plugin with admin-ajax.php?
- Ajax mousedown call getting “cancelled” when clicking link
- Get uploaded attachment width & height and attachment ID after upload them
- Uncaught TypeError: Cannot read properties of undefined (reading ‘message’) [closed]
- Disabling ajax code that does a POST request that ends in a 400 error code
- Refresh checkout fields on add to cart with order bump
- Add Server Side validation in Ajax mail form
- Is it good practice to use REST API in wp-admin plugin page? [closed]
- How to prevent my external API call from being called by anyone but me (my site)
- Ajax not sending the data correctly- Multidimensional array
- Registration form AJAX check for existing username (simple version)
- How to check Ajax request only when i opened the Notifications list?
- All WordPress AJAX calls always return 0
- Trigger action via button
- Syntax error on query_vars while handling with Jquery
- Want to send ajax request in wordpress to a custom file in plugin
- how to get password from user instead wp-generate-password
- Class called in template, AJAX not registering
- Same query in category.php and in function.php, but different result
- Sending email with wp_email and AJAX
- How to use nonces for frontend AJAX voting if the page gets cached?
- AJAX Call in Plugin Returns More than JSON
- Ajax Form seems to post, but does not return
- Objects and get_post_meta() gives me 1 string for latitude and longitude
- Why can wordpress not find the actions I add in my constructor?
- delete attachment for one post without deleting actual attachment post
- Memberpress isn’t cooperating with WooCommerce
- WordPress ajax requst returns zero
- wp_editor() in content that was loaded with ajax [duplicate]
- WordPress blocking polling request when signed into Admin
- Facebook Pixel + WooCommerce + AJAX = Confusion
- Send button using own contact form [closed]
- Run PHPMailer function after ajax function completes that adds row to custom table