WC Vendor
-
Im using the free WC Vendor plugin. I added the code below to my functions.php but the login still wont redirect to the vendors dashboard when vendors login. Please help..
Is there a certain spot the code should go? I tried at the top bottom and middle.. Thanks you very much.
/* 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;
}The page I need help with: [log in to see the link]
- The topic ‘WC Vendor’ is closed to new replies.