How do I hook an Ajax request into a PHP callback?

Your url should be pointing to admin-ajax.php

echo admin_url('admin-ajax.php');

Leave a Comment