Update User Role WordPress

$wp_user_object = new WP_User($current_user->ID);
$wp_user_object->set_role('editor');

Leave a Comment