Why is my AJAX call not working?

Okay so NOW I have the entire solution. It was two things:

  1. Caching was the first part of the issue. Cleared cache, deactivated caching plugin for the time-being.
  2. The second, less obvious issue was that, for NOT logged-in users, the response from the AJAX call was returning the entire HTML document in the response area. It turns out I had a “redirection” function in my functions.php file that was causing this. It’s designed to redirect users below author back to the front-end so they never access the backend and admin-ajax.php technically is operating from the admin side so that was the issue.

Leave a Comment