how to use ajax in plugin admin area?
Please, avoid the use of require(‘../../../wp-load.php’); and things like that as suggested in other answers. You should always use the WordPress AJAX way. It is really easy and you will have all WordPress engine loaded in your PHP script. Just three considerations: You have to send the ajax request to …wp-admin/admin-ajax.php. ajaxurl is a javascript … Read more