Register Helper incorporate code help
-
Hi,
I am using PMP to register a new user. I have the Register Helper addon to enable me to introduce new fields during the registration process. After registration, I am managing and displaying the user via Ultimate Member.
function my_pmprorh_init() { if ( ! function_exists( 'pmprorh_add_registration_field' ) ) { return false; } // Define the fields. $fields = array(); $fields[] = new PMProRH_Field( 'talent_categories', // input name, will also be used as meta key 'select', // type of field array( 'required' => true, // make this field required 'profile' => false, // do not only show in profile for admins 'levels' => array(6), 'label' => 'What type of talent are you registering?', // custom field label 'options' => array( // <option> elements for select field '' => 'Please select talent type', // blank option - cannot be selected if this field is required 'Model' => 'Model', // <option value="1</option> 'Actors' => 'Actors', // <option value="2</option> 'Dancers' => 'Dancers', // <option value="3</option> ) ) ); // Add the fields into a new checkout_boxes are of the checkout page. foreach ( $fields as $field ) { pmprorh_add_registration_field( 'checkout_boxes', // location on checkout page $field // PMProRH_Field object ); } // That's it. } add_action( 'init', 'my_pmprorh_init' );
I now want to add this code to the above, so that it will set the users Ultimate Member status to ‘Pending Review’ directly after the new user registers in PMP.
um_fetch_user( $user_id ); UM()->user()->pending();
Can anyone help me to incorporate this code in my main script.
Thanks in advance.
Denis
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Register Helper incorporate code help’ is closed to new replies.