abdnad89
Forum Replies Created
-
Hi,
OK, I will try enabling the User Cache option in WP Rocket.
Regarding the translations — yes, that was just an example. I meant the actual string “Thank you for registering. Your account requires manual approval”. I’ll try using the “Rescan plugins and themes for strings” option in TranslatePress to force detection.
Thanks for your help!
Additional note regarding translations:
We noticed that some B2BKing strings are not detected by TranslatePress — for example, notices shown to users after registration (e.g. “your account must be approved”) or the names of B2B groups. Could you confirm if these strings are properly declared as translatable, or if there is a specific method to make them appear for translation in TranslatePress?Hello,
Thank you for your reply — you were right, the issue was indeed caused by caching.
In our case, it was related to WP Rocket’s cache.I have added a snippet to disable caching for logged-in users:
phpCopier
Modifier
// disable cache for logged in users add_filter( 'do_rocket_generate_caching_files', 'nad_disable_cache_for_logged_in_users' ); function nad_disable_cache_for_logged_in_users( $can_cache ) { if ( is_user_logged_in() ) { return false; } return $can_cache; }This works most of the time: the non-cached version (with B2B prices and content) displays correctly.
However, sometimes the cached version still appears temporarily until the page is refreshed manually.We have also:
- Disabled Rocket Loader in Cloudflare
- Enabled and synced the Cloudflare add-on in WP Rocket
- Set up a login redirect to the Shop page
I will continue checking the configuration in WP Rocket and Cloudflare to ensure that no residual caching applies to logged-in users.
If you have any advice on how to force the immediate display of the non-cached version after login, I would be happy to hear it.Thanks again for your support and quick response.
👉 Additional note:
If there is no clean fix for this issue, we would be open to implementing an alternative solution:
Automatically redirecting B2B users to the Shop page after login, instead of the default woocommerce my account page— if that’s technically feasible with B2BKing.Let us know what you recommend.
Hello,
Thank you for your reply and your suggestions.
We’ve double-checked everything you mentioned — including WP Rocket, other cache plugins (none active), Elementor widgets. All seems to be configured correctly on our side.
That said, the issue appears to be intermittent:
- Sometimes, the problem occurs even on the Shop page (
/boutique) after logging in. - But it always happens on the homepage, especially when accessed by clicking on the main site logo (which redirects to
/).
What leads me to believe it’s a session loss issue is that:
- When this happens, the header bar switches from showing “My Account” (when connected) to ” Login / Register “, indicating the user is no longer recognized as logged in.
- Yet, if we manually reload the page or navigate to a product page, the user session is back, and B2B prices are shown again.
So it seems like the session is temporarily dropped or not recognized on specific page loads — mostly the homepage.
Please let us know if there’s any specific way B2BKing handles user sessions that might be affected by this, or if there’s a way to force session recognition more reliably.
Best regards,
Hi Stefan,
Thank you very much for your clarification and quick response!
Best regards,
Thank you very much for your detailed response and the helpful code snippet .
I have a quick follow-up question: within a specific B2BKing group (for example, “Resellers”), is it possible to differentiate between specific roles or sub-types of users and apply functionality based on those distinctions? In other words, can we target specific roles within a B2B group, and if so, how would you recommend implementing that?
Thanks again for your support!
Best regards,
Hello Stefan,
Thank you very much for your response and helpful suggestions.
We’ve decided to implement a shipping method without any calculation rules, which we’ll label something like “Shipping to be calculated later”. This method will be visible only to B2B customers, which aligns perfectly with our intention to handle shipping arrangements manually after the order is placed.
( we’ve also noticed that it’s technically possible to place an order without any shipping method at all.)We have a technical question :
Could you please advise on how to retrieve the B2B roles’ IDs , set by B2BKing?
We’d like to use them in a custom script to display specific notices only to logged-in users with a B2B role.Also, are these roles automatically recognized by other WooCommerce plugins, or would it be advisable to create aliases to ensure compatibility?
We’re also planning to upgrade to the premium version of your plugin to take full advantage of its extended features.
Thanks again for the excellent support and the great quality of your plugin.
Best regards,
Hi,
Thanks for confirming .
We’ll continue using the current setup with the
flexible_shipping_value_in_currencyfilter as recommended.Appreciate your support!
Best regards,
Hi,
Thank you for your response.
However, we are not using a specific shipping method like “Free Shipping.” Instead, we manage free shipping using a minimum order amount threshold, which is handled by the Flexible Shipping plugin.
Let me know if there’s a way to configure the user role restrictions in that context.
Best regards,