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

wp_new_user_notifications to notify user and admin about new user registration

If you’re operating under the assumption that wp_insert_user() sends the notification, then that’s where the problem is. That function just inserts the user – it does not by itself send any emails. You can use the function wp_send_new_user_notifications( $user_id ) to send user notification. However, you need to trigger it based on the result of … Read more