0

I am making ajax requests and everything seems to go to admin-ajax.php. I am writing a public facing plugin and it seems strange that a user would make a request to anything with the word admin in it. is this just a misnomer?

2
  • 3
    The admin-ajax.php endpoint is publicly accessible to anyone, but the wp_ajax_<action> hook will only run for logged-in users. So I'm not sure what exactly is the issue you're facing or trying to solve? Also, I'd suggest you to use the modern REST API where you can create your own custom endpoint and then make your AJAX requests to that endpoint instead.
    – Sally CJ
    Sep 18 at 18:01
  • 1
    Yeah, i think that's what i'm looking for. thanks.
    – DAB
    Sep 18 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.