If you first fetch a WP_User object with get_userdata()
, you should then be able to add your additional role with the add_role()
method, like so:
$user = get_userdata($user_id);
$user->add_role('partner');
If you first fetch a WP_User object with get_userdata()
, you should then be able to add your additional role with the add_role()
method, like so:
$user = get_userdata($user_id);
$user->add_role('partner');