jQuery espera async
async function myAjax(param) {
const result = await $.ajax({
url: ajaxurl,
type: 'POST',
data: param,
})
return result
}
Williams Bobadilla