Add custom fields in new customer form in sales agents dashboard
Saturday, 28 August 2021
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. In the same section, it is also possible to enable the extension of the customer registration form present right in the dashboard, by adding the predefined WooCommerce billing fields.
If you wish to further customize this form, without intervening on the standard registration form, you can use the special hook we have introduced for this purpose. To add a custom field to the new customer registration form in the sales agent dashboard, 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