Ajax call to my WordPress website from an external application [duplicate]
You shouldn’t be sending your data as JSON: dataType: “JSON” For add_action(“wp_ajax_nopriv_itempricingfunction” to work, WordPress needs to find the action parameter in your request, which you’re correctly setting here: data: { action : “itempricingfunction”, ean : “EANTEST0101010” }, The problem is that it checks this using $_REQUEST[‘action’], but PHP doesn’t populate $_REQUEST with JSON. It … Read more