Redirecting vendors to dashboard

Home Forums WC Vendors Free Support Redirecting vendors to dashboard

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

Thank you to all of our customers!


Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #514

    Hi Ben,

    I can’t get your knowledgebase article on redirecting vendors to the seller dashboard to work:

    I’ve pasted the code into functions.php, but when I login as a seller, I am not re-directed anyway. I just go to the seller’s setting page.

    I think one of the commenters may be on to something when she says the code is wrong.

    /* Redirect Sellers to Seller Dashboard on Login */
    add_filter(‘woocommerce_login_redirect’, ‘login_redirect’, 10, 2);
    function login_redirect( $redirect_to, $user ) {
    if ( PV_Vendors::is_vendor( $user->id ) ) {
    $pv_settings = get_option(‘wc_prd_vendor_options’);
    $shop_settings_page = $pv_settings[‘shop_settings_page’];
    $redirect_to = get_permalink($shop_settings_page);
    return $redirect_to;
    } else {
    $redirect_to = ‘my-account’;
    return $redirect_to;

    The line I’ve highlighted, shouldn’t that redirect to the vendor dashboard page?


    Page formatting was off. Check it again and copy & paste that code, should do the trick!


    Now I’m getting this error:

    Parse error: syntax error, unexpected ‘&’ in /home/madbiddi/public_html/ on line 135

    Line 135 is this one: if ( PV_Vendors::is_vendor( $user->id ) ) {


    Fixed on KnowledgeBase Article.

    change /seller_dashboard to the URI of the page you want sellers to be redirected to.

    • This reply was modified 6 years, 3 months ago by ben.

    That works perfectly, thanks!


    You are very welcome. 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘WC Vendors Free Support’ is closed to new topics and replies.

Pro Bundle Special Offer 35% OFF

Get all the plugins essential for your marketplace website in one place and save. Over $600 value for just $397!

This website uses cookies to ensure you get the best experience on our website.