BuddyBoss Home – Web › Support Forums › Themes › OneSocial theme › Vendors aren't redirected to Vendor Dashboard on Log in
- This topic has 2 replies, 2 contibutors, and was last updated 8 years, 7 months ago by Karen Thomas.
Question
March 27, 2016 at 5:30 am #65526@conscious-craftiesHello,
I’m a WCVendors customer. When my vendors log in via My Account, they are redirected to their Vendor Dashboard by adding this code to my functions.php file:
/* Redirect Vendors to Vendor Dashboard on Login */ add_filter('woocommerce_login_redirect', 'login_redirect', 10, 2); function login_redirect( $redirect_to, $user ) { // WCV dashboard -- Uncomment the 3 lines below if using WC Vendors Free instead of WC Vendors Pro // if (class_exists('WCV_Vendors') && WCV_Vendors::is_vendor( $user->id ) ) { // $redirect_to = get_permalink(WC_Vendors::$pv_options->get_option( 'vendor_dashboard_page' )); // } // 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; }
However, if they log in using the One Social log in form, they are not redirected to their Vendor Dashboard.
How do I make this work? Lots of WCVendors customers use this redirection – the code is provided by WCVendors.
Many thanks,
Karen
Answers
March 29, 2016 at 1:35 pm #65892@
AnonymousHi @conscious-crafties
above code is hooked with woocommerce_login_redirect and will work fine with my-account page.Top popup login is not linked with WooCommerce action, that’ why it will not redirect vendors to Vendors dashboard.
We have to use the native approach with our popup login and register options to support additional plugin, it’s already in our to list.
Regards
Varun DubeyMarch 30, 2016 at 6:15 am #66005@conscious-craftiesCan I just check my understanding that it is on the list to add the redirect code (to dashboard) for Vendors when they log in? Also can you give me an idea of when that will be?
Many thanks
- The question ‘Vendors aren't redirected to Vendor Dashboard on Log in’ is closed to new replies.