WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp_ajax_ 302 error (2 posts)

  1. fused
    Member
    Posted 3 years ago #

    Hi Guys,

    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?

    Thanks!

  2. fused
    Member
    Posted 3 years ago #

    I've tracked it down to an issue with a membership plugin I'm using. I'll be closing the thread as I've contacted the plugin author.

Topic Closed

This topic has been closed to new replies.

About this Topic