Create Proper WordPress Ajax Request in JavaScript, NOT jQuery
There are 4 filters to work with WordPress ajax. According to your description, the following conditions are assumed wp_ajax_{$action} is for running in frontend and the user is logged in if echo something in the php file, it will not reflect in the frontend. Javascript alert will output ‘hello’ your javascript seems to be done … Read more