I see that b2bking stores useful information in user metadata (e.g. 'b2bking_customergroup'). Is there a definitive list of all user metadata keys and what is stored? I can look through the code but would be nice to have a central resource. thx.
Other than that, I don't have a specific article with user metadata. I can list the main ones below:
key: b2bking_b2buser value: yes for b2b users, unset or no for others
key: b2bking_customergroup value: group ID of the B2B group (for b2b users only)
key: b2bking_account_approved value: no for users that require approval
the value of custom fields is also stored as meta in keys with the name:
b2bking_custom_field_1234 where 1234 is the ID of each field. So for example if you were looking to get the VAT number of a customer, you'd get it from a field such as b2bking_custom_field_****
If there's anything in particular you're looking for, please let me know,
I see that b2bking stores useful information in user metadata (e.g. 'b2bking_customergroup'). Is there a definitive list of all user metadata keys and what is stored? I can look through the code but would be nice to have a central resource. thx.
Hi Russell,
You can find some information on useful functions and options in the main developer docs article here:
https://woocommerce-b2b-plugin.com/docs/developer-documentation-hooks-functions-custom-code/
Other than that, I don't have a specific article with user metadata. I can list the main ones below:
key: b2bking_b2buser value: yes for b2b users, unset or no for others
key: b2bking_customergroup value: group ID of the B2B group (for b2b users only)
key: b2bking_account_approved value: no for users that require approval
the value of custom fields is also stored as meta in keys with the name:
b2bking_custom_field_1234 where 1234 is the ID of each field. So for example if you were looking to get the VAT number of a customer, you'd get it from a field such as b2bking_custom_field_****
If there's anything in particular you're looking for, please let me know,
Kind regards,
Stefan