The custom role shop manager created by Woocommerce can only assign the customer role when adding a user.
I'm trying to let shop manager choose from the different roles by enabling the capability promote_users.
function shop_manager_add_users() {
$role = get_role( 'shop_manager' );
$role->add_cap( 'promote_users' );
}
add_action( 'admin_init', 'shop_manager_add_users');
It's not working, the selection drop down only offers the customer role, and other roles are still hidden.
Is there another capability that should be enabled?