Public Ticket #3611037

User metadata

Closed
Comments
5 Tickets
Russell Johnson started the conversation 3 years ago on March 20, 2024 at 5:29pm

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.

2,762
KingsPlugins replied 3 years ago on March 23, 2024 at 4:43am

Hi Russell,

You can find some information on useful functions and options in the main developer docs article here:

https://b2bkingplugin.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

Sign In