Created
November 6, 2018 20:31
-
-
Save thomasplevy/a883270b41ed50a437c0e604a2d367d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // don't copy this line to your functions.php file | |
/** | |
* Use a different role during LifterLMS user registrations | |
* @param array $data assoc. array of data to be used to create the new user | |
* @return array | |
*/ | |
function my_modify_default_user_role( $data ) { | |
$data['role'] = 'subscriber'; | |
return $data; | |
} | |
add_filter( 'lifterlms_user_registration_insert_user', 'my_modify_default_user_role' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
note: use in onboarding for course
WC users need to understand the difference