Public Ticket #4565906

B2b King pro conflict with WPML (URGENT)

Closed
Comments
19 Tickets
TEWEB started the conversation 5 months ago on May 20, 2026 at 9:09am

We are having an really urgent issue with the b2b king pro plugin with wpml. 

We have 3 language in our site, Main is DE, other is EN and FR. When b2b king pro plugin is active , we don't see any product in front end of EN and FR. But we can see them in backend. If we want to visit the product (EN,Fr) from backend it redirects to my account page of that language. 

During debugging we found that B2BKing modifies WooCommerce product queries through:

B2bking_Public::b2bking_visibility_wordpress_posts

(priority 9999 on pre_get_posts)

The affected WooCommerce shop query contained a large post__in array with mixed-language product IDs (DE/EN/FR together), which caused:

translated products not showingtranslated product URLs redirecting to My Accountmultilingual shop queries breaking



Can you please help us with this ? we have to go live today. 

19 Tickets
TEWEB replied 5 months ago on May 20, 2026 at 9:13am

The issue appears to come from B2BKing Pro’s product visibility filtering in public/class-b2bking-public.php.

The functions b2bking_product_categories_visibility_rules() and b2bking_visibility_wordpress_posts() generate allowed product ID lists and apply them to WooCommerce queries through post__in / post__not_in.

On our WPML multilingual WooCommerce site, the generated post__in list contains mixed-language product IDs. As a result, EN/FR shop pages stop showing products, and translated product URLs redirect to My Account with redirect_to.

Disabling B2BKing immediately fixes all translated shop pages and product URLs.

Please check B2BKing’s WPML visibility cache/transient handling, especially:
b2bking_user_{USER_ID}_ajax_visibility
b2bking_user_{USER_ID}_ajax_visibility{ICL_LANGUAGE_NAME_EN}

It seems the visibility whitelist is not being generated or cached separately/correctly per WPML language.

19 Tickets
TEWEB replied 5 months ago on May 20, 2026 at 9:20am

We just found that issue was product visibility control settings. 

It's not any bug i guess. it's just that settings was not setup properly. 

2,762
KingsPlugins replied 5 months ago on May 23, 2026 at 9:41pm

Hi there,

Glad to hear you found the issue,

 

A few things to keep in mind going forward:

1. Product visibility setup
By default, visibility is based on category settings, which can get complex when a product belongs to multiple categories. The easiest setup is to edit each product individually and configure Manual Visibility for it. More info here: https://b2bkingplugin.com/docs/faq-product-visibility-is-not-working-how-to-set-up-product-visibility/

 

2. WPML considerations
With WPML, each translation is technically a separate product. That means one language can end up with different visibility settings than another for the same product. To avoid this, you can go into WPML settings and set the following B2BKing visibility keys to "Copy":

- b2bking_group_0
- b2bking_group_b2c
- b2bking_product_visibility_override
- b2bking_group_GROUPID (e.g. b2bking_group_73, for each of your B2B groups)

That way, when you save visibility on one language, it auto-copies to the other languages. The principle is similar to what's described here (the doc is about prices, but the same logic applies): https://b2bkingplugin.com/docs/translate-b2bking-with-wpml/#3-toc-title

Let me know if anything is unclear or if you run into other issues.

Kind regards,
Stefan

Sign In