Reply To: User Role field

#10002529
Avatar
Pie Register
Participant

Hello,

You can do it in the following way:

1.) Add a drop-down menu with desired roles manually (Set this field
hidden on Profile).
2.) Add a Hook in your theme’s function.php

add_action('pie_register_after_register_validate','my_custom_user_role_cb',10,1);
function my_custom_user_role_cb($user){
         //Put your snippet here to assign user
         // You have User Object to retrieve back the Role Option User
selected with get_user_meta function
}

Hope it helps!

Thanks