Using b2bkings Registration Fields tool and the documentation here https://woocommerce-b2b-plugin.com/docs/extended-registration-and-custom-fields/ I have created an additional registration field for my customers that I've named "Department" which is primarily meant to be used with subaccounts. This field is a text field, optional, and editable post-registration. It also has no WooCommerce Billing Field Connection, as I want it to be visible on invoices.
The field shows up and functions on the user dashboard as expected, however, when I enter a value into the field and save it, that value gets saved to every user's Department within the b2bking group, when I want it to be on an individual basis. I copied the First Name field and tweaked the variables to see if that made a difference, but that gave me the same result. I also tried entering and saving the value on both a main account and a subaccount, in different browsers just to be safe, but it duplicated the value regardless of account status.
This snippet can be added to functions.php of your theme or any code snippets plugin. Once added, the custom fields should be individual for each user rather than shared across the group.
Using b2bkings Registration Fields tool and the documentation here https://woocommerce-b2b-plugin.com/docs/extended-registration-and-custom-fields/ I have created an additional registration field for my customers that I've named "Department" which is primarily meant to be used with subaccounts. This field is a text field, optional, and editable post-registration. It also has no WooCommerce Billing Field Connection, as I want it to be visible on invoices.
The field shows up and functions on the user dashboard as expected, however, when I enter a value into the field and save it, that value gets saved to every user's Department within the b2bking group, when I want it to be on an individual basis. I copied the First Name field and tweaked the variables to see if that made a difference, but that gave me the same result. I also tried entering and saving the value on both a main account and a subaccount, in different browsers just to be safe, but it duplicated the value regardless of account status.
Hi Benjamin,
Glad to assist,
By default, main accounts and subaccounts share custom registration fields (which is the behavior you're seeing).
You can disable this behavior by adding the following code snippet:
This snippet can be added to functions.php of your theme or any code snippets plugin. Once added, the custom fields should be individual for each user rather than shared across the group.
Let me know if I can help,
Stefan
Adding that code snippet worked like a charm, thank you Stefan!