Ajax call does not activate callback function

Since you’re serializing the form, as ajax data, you could be missing the action part from your form:

<input type="hidden" name="action" value="bda_alert">

so your ajax request would contain

/wp-admin/admin-ajax.php?action=bda_alert&...

that should invoke the wp_ajax_bda_alert or wp_ajax_nopriv_bda_alert action callback.

Leave a Comment