Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter leavai

    (@lparga)

    I resolved it applying this code in functions.php to redirect users to “orders” page after a successful login.

    //Redirect after login
    
    function my_login_redirect( $url, $request, $user ){
    if( $user && is_object( $user ) && is_a( $user, 'WP_User' ) ) {
    if( $user->has_cap( 'administrator')) {
    $url = admin_url();
    } else {
    $url = home_url('/orders /');
    }
    }
    return $url;
    }
    add_filter('login_redirect', 'my_login_redirect', 10, 3 );
    
    //End Function Redirect after login
    Plugin Contributor Kshirod Patel

    (@kshirod-patel)

    Hello @lparga ,

    Glad to know that you have figured out the issue. Please give us a review if you really liked plugin so far.

    @kshirod-patel how can we create an account to user that goes to checkout page? I want to save the shipping address and chose this on checkout.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Customer Login Error 500’ is closed to new replies.