But i am using 3 B2B usergroups. how can i used that code to work with 3 different user groups people can register and cut out the customer user group.
Thank you!
The page I need help with: [log in to see the link]
This snippet does not depend on the group. It will give every user with ‘manual approval’ the ‘b2b_role’ role. (you need to rename ‘b2b_role’ to the name of your desired role)
By default we do not remove the ‘customer’ role, because normally every customer in WooCommerce (b2c or b2b customer) should also have the ‘customer’ role. So we give the user multiple roles.
If you want to remove the ‘customer’ role for B2B users, you could use this snippet:
This snippet removes the customer role, but it will work only for users who register with MANUAL approval. The snippet works during user registration.
The reason i try to disable the customer role is because of this bug:
I have some extra registration fields added. In registration they look fine. But in checkout the Field Names are missing. Then, when i remove the customer role, the field names show up.
I am not sure what causes that but I would be happy to check it directly on your site if you’d like. Could you share a backend login to the site / staging site with us?
You can open a ticket with us at https://webwizards.ticksy.com – if you support period expired, no problem, just open the ticket in the B2BKing Pre-Sales category (that category doesn’t require it) and I will look into it,