WP Ajax Function Always Returning undefined
Per @SallyCJ suggestion to use await I construed this new function async function doAjax(email) { let result; try { result = await jQuery.ajax({ url: ajaxurl, type: ‘POST’, data: {“action”: “custome_ajax_email_check”, “guestemail”: email } }); return result; } catch (error) { console.error(error); } } Then my validate() function now just is simply function validate() { var … Read more