Autoswitch sales agent to customer account on new registration
Sunday, 02 January 2022
WooCommerce B2B Sales Agents allows sales agents to create new customers from their dashboard, if the “NEW CUSTOMERS” option is enabled on the plugin settings page.
After this, sales agent can switch on customer account in customer details page (by clicking “Details” button in customers list).
If you desire to automatically switch on new customer account after registration, you can edit functions.php file that you find in your site’s FTP space in:
and insert this code:
It is advisable not to edit the theme files directly, but to use a child theme.
For more information on child themes, please read: WordPress Official guide on Child Themes