Created
May 10, 2021 14:41
-
-
Save nikitasinelnikov/5af885ffedfc9b972d68913c94fffc05 to your computer and use it in GitHub Desktop.
Ultimate Member: Activate ability to add users via registration form
This file contains hidden or 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
//to make this ability possible for all registration forms on your website | |
add_filter( 'um_registration_for_loggedin_users', '__return_true' ); | |
//to make this ability possible only for {selected registration form ID here} | |
function my_custom_um_registration_for_loggedin_users( $activate, $args ) { | |
if ( $args['form_id'] == '{selected registration form ID here}' ) { | |
$activate = true; | |
} | |
return $activate; | |
} | |
add_filter( 'um_registration_for_loggedin_users', 'my_custom_um_registration_for_loggedin_users', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment