I’d like to include a field on the registration page where different user roles can be selected. I have the WP Roles at Registration plugin installed, but I am unable to figure out a way to either integrate the plugin with the Pie Register plugin or to fix the issue in a different 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
}