Is it possible to access admin-ajax.php using PHP?

It returns a 0 because that AJAX handler is only meant for logged in requests, and no non_priv handler was registered. 0 is the final fallback. Attempt #1 While you could register your own AJAX handler that calls the function that generates the PDF and put it in a mini plugin, there’s an alternative: add_action(“wp_ajax_no_priv_wcpn_export”, … Read more