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

Time consuming callbacks in customizer

Building upon How to hook on customizer section expanded/active/opened event? question, perhaps you could listen for the section (or panel) expanding like this to unbind functions from the previuos section and bind them to the current section. (function ( api ) { // Wait for Customizer to be ready api.bind( ‘ready’, function() { // “cache” … Read more