We are working on a WooCommerce B2B store using B2BKing for group-based visibility rules and we would like to clarify something regarding taxonomy compatibility.
Setup:
WooCommerce
Brands implemented as a separate taxonomy (WooCommerce Brands)
B2BKing used for user group visibility and product restrictions
Requirement:
The client needs different user groups to see different brands.
Currently, B2BKing allows visibility control based on:
Products
Categories
Other built-in structures
However, since Brands are implemented as a separate taxonomy (not product categories), there is no native way to link:
B2BKing Group Visibility → WooCommerce Brand Taxonomy
At the moment, this would require custom development logic to map taxonomy terms to B2BKing visibility rules.
Before proceeding with custom development, we would like to ask:
Are you planning to extend visibility controls to support custom taxonomies such as WooCommerce Brands?
Do you offer hooks/filters that would allow us to programmatically control visibility based on a custom taxonomy?
Is this feature already available in a different configuration that we may have missed?
This functionality is becoming essential for our client’s B2B structure, so we would appreciate clarification on your roadmap or recommended implementation approach.
Thank you for purchasing our plugin and for reaching out!
It is possible to change the visibility logic in B2BKing to work with Brands instead of Categories (as they are both taxonomies). We have a snippet that allows you to swap the taxonomy used for these settings.
You can add the following PHP snippet to your site:
Hello,
We are working on a WooCommerce B2B store using B2BKing for group-based visibility rules and we would like to clarify something regarding taxonomy compatibility.
Setup:
WooCommerce
Brands implemented as a separate taxonomy (WooCommerce Brands)
B2BKing used for user group visibility and product restrictions
Requirement: The client needs different user groups to see different brands.
Currently, B2BKing allows visibility control based on:
Products
Categories
Other built-in structures
However, since Brands are implemented as a separate taxonomy (not product categories), there is no native way to link:
B2BKing Group Visibility → WooCommerce Brand Taxonomy
At the moment, this would require custom development logic to map taxonomy terms to B2BKing visibility rules.
Before proceeding with custom development, we would like to ask:
Are you planning to extend visibility controls to support custom taxonomies such as WooCommerce Brands?
Do you offer hooks/filters that would allow us to programmatically control visibility based on a custom taxonomy?
Is this feature already available in a different configuration that we may have missed?
This functionality is becoming essential for our client’s B2B structure, so we would appreciate clarification on your roadmap or recommended implementation approach.
Hi there,
Thank you for purchasing our plugin and for reaching out!
It is possible to change the visibility logic in B2BKing to work with Brands instead of Categories (as they are both taxonomies). We have a snippet that allows you to swap the taxonomy used for these settings.
You can add the following PHP snippet to your site:
add_filter('b2bking_visibility_taxonomy', function($val){ $taxonomy = 'product_brand'; // replace with your custom taxonomy return $taxonomy; }, 10, 1); add_action('wp_loaded', function(){ $taxonomy = 'product_brand'; // replace with your custom taxonomy global $b2bking_admin; remove_action( 'product_cat_add_form_fields', array($b2bking_admin, 'b2bking_enable_visibility_settings_add_category'), 10, 2 ); remove_action( 'product_cat_edit_form_fields', array($b2bking_admin, 'b2bking_enable_visibility_settings_edit_category'), 10, 1); remove_action('edited_product_cat', array($b2bking_admin, 'b2bking_save_category_visibility_meta_settings'), 10, 1); remove_action('create_product_cat', array($b2bking_admin, 'b2bking_save_category_visibility_meta_settings'), 10, 1); add_action( $taxonomy.'_add_form_fields', array($b2bking_admin, 'b2bking_enable_visibility_settings_add_category'), 10, 2 ); add_action( $taxonomy.'_edit_form_fields', array($b2bking_admin, 'b2bking_enable_visibility_settings_edit_category'), 10, 1); add_action('edited_'.$taxonomy, array($b2bking_admin, 'b2bking_save_category_visibility_meta_settings'), 10, 1); add_action('create_'.$taxonomy, array($b2bking_admin, 'b2bking_save_category_visibility_meta_settings'), 10, 1); }, 10);This code can be added to the `functions.php` file of your child theme or via any code snippets plugin.
Note: This snippet replaces the category visibility functionality. This means you will no longer be able to set visibility by category.
Let me know if that works for you or you run into any issues with this!
Kind regards,
Stefan