Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Redirect Vendors to Vendor Dashboard on Login */
- 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;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement