Hi @fchantal11,
Thank you for reching out!
Could you please try to:
- Add the following line of code to your site’s wp-config.php file:
define( 'SFWC_VALID_ROLE_LOOSE_MODE', true );
- Go to: Dashboard → WooCommerce → Subaccounts → Options tab → Select the buyer role(s) to enable the subaccount system for
- Check if the role you would like to enable is now available for selection (if it’s available, select it and click “Save changes”)
- If the role is still not showing, you should add the following snippet of code to your child theme’s functions.php file (remember to replace additional_role with the actual role name)
// Enable additional roles for Subaccounts for WooCommerce plugin.
function m3di4ticus_sfwc_enable_additional_roles( $current_user_roles ) {
// Replace additional_role with the actual name of the role that should be enabled.
array_push( $current_user_roles, 'additional_role' );
// If you need to enable more than one role.
// array_push( $current_user_roles, 'additional_role_1', 'additional_role_2', 'additional_role_3' );
return $current_user_roles;
}
add_filter( 'sfwc_add_valid_roles', 'm3di4ticus_sfwc_enable_additional_roles', 10, 1 );
The role(s) should now be available for selection, always in: Dashboard → WooCommerce → Subaccounts → Options → Select the buyer role(s) to enable the subaccount system for.
Please let us know if the above procedure fixes your issue. If anything is unclear or you encounter any issues please let us know.