Home Forums WC Vendors Free Support Another one on "Redirecting Vendors to Vendor Dashboard on Login"

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 Wordpress.org 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.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #60599
    luca
    Participant

    Hi,

    I have added the code to my functions.php page, the code seems to be right (I have deleted the Pro version) but nothing happens.

    My site uses Storefront with Bookshop as Child Theme.
    I have added the code to the plugin “Theme Customisation Master” as the people at Woocommerce suggest.

    What I am doing wrong?

    The exact code I added is

    add_filter('woocommerce_login_redirect', 'login_redirect', 10, 2);
    function login_redirect( $redirect_to, $user ) {
      if (class_exists('WCV_Vendors') && WCV_Vendors::is_vendor( $user->id ) ) {
       $redirect_to = get_permalink(WC_Vendors::$pv_options->get_option( 'vendor_dashboard_page' ));
      }
       return $redirect_to;
    }

    Any help appreciated!

    #60616
    Anna
    Member

    Hello,
    Yes- the code looks right.
    Are you putting it in the custom/functions.php file in that plugin?
    If you try putting it in the functions.php file of the Bookshop child theme, does it work?

    #60623
    luca
    Participant

    Hi Anna,
    It is correct, I put the code in custom/functions.php

    I also tried to add it to the child theme or the main theme functions.php and it’s even worse, because I end up with a blank page on the front end…

    #60700
    Anna
    Member

    @paltrilu
    I just tested this on my dev site using this code in the child theme functions.php, and it works– redirects the vendor to the dashboard:
    https://gist.github.com/fervous/feb3a043c399b0b1fb18f9488e75aed8

    If it is still not working on your site, then please switch to the storefront parent theme, and see if it works. The Bookstore child theme may already have a redirect built-in

    #60876
    luca
    Participant

    Still not working.

    I have switched to the storefront parent theme, and it doesn’t work.

    I have deactivated all plugins but WCVendors and Woocommerce, and it doesn’t work either…

    #77593
    nkbhashani
    Participant

    https://www.wcvendors.com/members/fervous/

    hello , can u help me pls

    i m useing wcvenders free plugin and simple thing not doing solve, when i register a vender or customer

    and click on register after fill the all details , the page get white with error 500 something, but itnernaly it create the user whatever new customer or new vender, but the thing is its not redirct on my account page , i try every thing, i check all setting google lots of code simple redirecting code is everywhere u also posted here ,but its not working can u pls tell me strong solution, pls

    i can tell u here that i have change the theme so there was some old pages also , so i revoved the duplicated pages , and i have checked the all shortcoded all are allright which should be in the page ,

    pls tell me solution pls

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