Alright, I came across another answer that’s finally solved this. I had a function (in functions.php
) which revoked admin access to some user types I’d created with custom privileges – that was blocking non-admin access to admin-ajax.php
. Old/new function below:
Old function
// Revoke dashboard access
add_action('admin_init', 'restrict_access_admin_panel');
function restrict_access_admin_panel(){
global $current_user;
get_currentuserinfo();
if ($current_user->user_level < 4) {
wp_redirect( get_bloginfo('url') );
exit;
}
}
New function
// Revoke dashboard access
add_action( 'admin_init', 'restrict_access_admin_panel' );
function restrict_access_admin_panel(){
if ( !defined( 'DOING_AJAX' ) && !current_user_can('administrator') ){
global $current_user;
get_currentuserinfo();
if ($current_user->user_level < 4) {
wp_redirect( get_bloginfo('url') );
exit;
}
}
}