I’ve created a custom theme and used the wp_ajax_ and wp_ajax_nopriv_ action in the functions file and it works great when logged out or logged in as an admin. However, if I’m logged in as a subscriber, the AJAX call results in a 302 error. If I switch the user role to admin, it works. So its definitely the “subscriber” role. My guess is the role doesn’t have the capability to make AJAX calls, but because the user is logged in, it doesn’t default to the wp_ajax_nopriv action (again, just a guess).
Has anyone encountered this bug? An suggestions for a fix?
- The topic ‘wp_ajax_ 302 error’ is closed to new replies.