Hi,
Is it possible to change the default role for newly created subaccounts from "Customer" to something else?
Thanks,
Hi,
Is it possible to change the default role for newly created subaccounts from "Customer" to something else?
Thanks,
Hi Kevin,
Yes, you can do that with a PHP code snippet.
The snippet is:
add_action('b2bking_after_subaccount_created', function($user_id){
$userobj = new WP_User($user_id);
$userobj->set_role('editor');
}, 10, 1);
In the above, replace "editor" with any role that you want.
You can add the above to functions.php or by using our guide here https://b2bkingplugin.com/docs/how-to-add-a-snippet-php-or-js/
Kind regards,
Stefan