We're developing an Wordpress plugin, and for that we need to send some AJAX requests in the admin side across files within our own plugin directory. Currently it is working fine if I send it directly to that specific file url, like-
$.get("https://www.example.com/wp-admin/admin.php?page=sample_projects&action=delete&id=01&noheader=true", function(status){
//Do something here });
But I'm reading everywhere in the community that to use AJAX in Wordpress I need to direct requests to admin-ajax.php. I found a good documentation here- https://codex.wordpress.org/AJAX_in_Plugins
So, my questions are-
Thanks in advance, and sorry if this question seems repetitive to you.