I would like to check in my WP PHP plugin to what B2B group the logged-in user belongs or check if a user is part of a specific B2B Group.
- Is there a B2BKing function I can call to retrieve the B2B group ID and/or the B2B group's name? (Something like $groupID = get_user_meta(get_current_user_group_ID(), true); )
- Is there an overview of all B2BKing hooks and variables?
Elaborated usage scenario: I have coded a custom free product offering plugin that should automatically add and remove some free products if certain conditions are met. These combinations are too complex too implement with the current B2BKing dynamic rules. Because they vary over the different B2B Groups, I need a way to distinguish these groups in my script and trigger different functions based on this information.