Home Forums WC Vendors Pro Support Role redirect query

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 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #34912
    Mubasher
    Participant

    Hello

    When a vendor logs in they are sent to my-account page which is useless for vendor as it asks for billing address etc..but need to be sent to the pro dashboard page. Only customers who register should be sent to my-account page.

    Basically how can I have a redirect for vendors role only to pro-dashboard page. A plugin solution would be great as not a coder unless it’s a paste job.

    #34926
    WC Vendors Support
    Participant

    Check out the KnowledgeBase. 🙂 There’s articles in there with copy/paste code on how to do that.

    #35018
    Mubasher
    Participant

    hello Ben,

    thanks i did locate it and copied the following code (have no idea what it means) but it doesnt seem to work- i literally deleted a few lines and copied and pasted the below to the function file (maybe im not copying it in the right place. Any chance you can have a look for me please in my site.

    /* Redirect Vendors to Vendor Dashboard on Login */
    add_filter(‘woocommerce_login_redirect’, ‘login_redirect’, 10, 2);
    function login_redirect( $redirect_to, $user ) {

    // WCV Pro Dashboard
    if (class_exists(‘WCV_Vendors’) && class_exists(‘WCVendors_Pro’) && WCV_Vendors::is_vendor( $user->id ) ) {
    $redirect_to = get_permalink(WCVendors_Pro::get_option( ‘dashboard_page_id’ ));
    }
    return $redirect_to;
    }

    #35026
    WC Vendors Support
    Participant

    That code will work when a user goes to /my-account/ and logs in from that page yup!

    #35046
    Mubasher
    Participant

    Hello Ben,

    my login page is set to my-account page but no luck.

    my-account page

    can you try please?

    #35062
    WC Vendors Support
    Participant

    Aah, you’re using Social Marketplace. They override the login redirects themselves, so I dont think our code would do the trick. You’ll want to reach out to them for help on this one. When you find a solution, please do reply back here with what it is so anyone else searching with the same issue can find the solution faster. Thanks!

    #35715
    Mubasher
    Participant

    Hello just want to update on this.. If you want your vendors to be redirected upon login to the dashboard page then use a plugin called ‘peters login redirect’ works a charm.

    So now my vendors are going to the vendor dashboard and customers going to my-account page.

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