skip to Main Content

Check if email exists in WordPress through Ajax on HTML form submision

In my WordPress v5.8.2, I have localized the ajax_url in the functions.php: wp_enqueue_script('site_scripts', get_stylesheet_directory_uri() . '/assets/js/site-scripts.js', array('jquery'), null, true); wp_localize_script('site_scripts', 'site_ajax', array('ajax_url' => admin_url('admin-ajax.php'), 'check_nonce' => wp_create_nonce('site_ajax_nonce'))); With the below jQuery script I am processing the form to check if…

VIEW QUESTION
Back To Top
Search