Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. /* Redirect Vendors to Vendor Dashboard on Login */
  2. add_filter('woocommerce_login_redirect', 'login_redirect', 10, 2);
  3. function login_redirect( $redirect_to, $user ) {
  4. if (class_exists('WCV_Vendors') && WCV_Vendors::is_vendor( $user->id ) ) {
  5. $redirect_to = get_permalink(WC_Vendors::$pv_options->get_option( 'vendor_dashboard_page' ));
  6. }
  7. return $redirect_to;
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement