wp_ajax_ works fine but wp_ajax_nopriv_ returns HTML and not calling function
Found the solution, reason why it was returning HTML is because it was doing a 302 redirect to the home page. Turns out that I had a function in my theme that redirects none logged in users away from the wp-admin pages which is where admin-ajax.php is. <?php // IF SUSBSCIBER GOES TO ADMIN /wp-admin … Read more