Advertisement
wclovers

Untitled

Sep 22nd, 2023
661
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. add_filter( 'wcfm_login_redirect', function( $redirect_to, $user ) {
  2.     if ( isset($user->roles) && is_array($user->roles) ) {
  3.         if ( in_array( 'wcfm_vendor', $user->roles ) ) {
  4.             $redirect_to = home_url();
  5.         }
  6.     }
  7.     return $redirect_to;
  8. }, 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement