Advertisement
verygoodplugins

Untitled

Oct 8th, 2020
1,052
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. function volunteer_role( $update_data, $user_id ) {
  2.  
  3.     if ( isset( $update_data['role'] ) && 'volunteer_both' == $update_data['role'] ) {
  4.         $update_data['role'] = 'Volunteer';
  5.     }
  6.  
  7.     return $update_data;
  8.  
  9. }
  10.  
  11. add_filter( 'wpf_user_register', 'volunteer_role', 10, 2 );
  12. add_filter( 'wpf_user_update', 'volunteer_role', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement