Home › Forums › WC Vendors Pro Support › Vendor Register redirect › Reply To: Vendor Register redirect
March 18, 2017 at 10:50 am
#59348
Anna
Member
Hello,
I am not sure if your theme is already re-directing your vendors, but this code below should work to direct to the Pro Dashboard:
/* Redirect Vendors to Pro Vendor Dashboard on Login */
add_filter('woocommerce_login_redirect', 'login_redirect', 10, 2);
function login_redirect( $redirect_to, $user ) {
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;
}