Advertisement
wclovers

Untitled

Oct 27th, 2023
661
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.27 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('shop_manager', $user->roles)) {
  4.             $redirect_to = admin_url();
  5.         }
  6.     }
  7.     return $redirect_to;
  8. }, 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement