Issue: Non-Purchasable dynamic rule for guest visitors is not hiding the Add to Cart button on product pages. Button remains visible to logged-out users.
Environment:
Theme: WoodMart (B2BKing-approved)
Builder: WPBakery (custom product page template)
Cache: Cloudflare + local cache (both purged during testing)
Rule configuration:
Rule type: Non-Purchasable
Applies to: Cart total / All products
For who: Guest visitors (not logged-in)
Status: Published
Troubleshooting performed:
Confirmed rule is saved and published
Tested in separate browser (not logged in) — Add to Cart still visible
Cleared local WP cache and Cloudflare cache (Purge Everything)
Disabled WoodMart AJAX Add to Cart (Theme Settings → Single product → Add to cart)
Tested basic guest restriction "Hide prices" — button still showed
Tested "Hide shop & products" — this worked, confirming B2BKing is functional for guests; issue is isolated to the Non-Purchasable rule hook not firing on the WPBakery custom product template
Conclusion: B2BKing's guest restrictions work, but the Non-Purchasable rule does not remove the Add to Cart button when the product page is rendered via WPBakery custom layout in WoodMart.
Just to confirm, is your main goal to show prices but hide the Add to Cart button for logged-out users?
Non-purchasable rules do not always hide the button completely. This behavior depends heavily on the theme. We mark the product as not purchasable in WooCommerce data, but each theme implements this slightly differently. Some themes only gray out the button, while others hide it entirely. Since you are using a custom product page template with WPBakery, that is likely the issue.
We would like to help you find a solution for this. I believe we can most likely resolve it using a PHP code snippet.
To help us test and provide the exact code needed for your template, would it be possible to share a backend login to the site, or perhaps a staging clone where we can safely troubleshoot this directly?
Issue: Non-Purchasable dynamic rule for guest visitors is not hiding the Add to Cart button on product pages. Button remains visible to logged-out users.
Environment:
Rule configuration:
Troubleshooting performed:
Conclusion: B2BKing's guest restrictions work, but the Non-Purchasable rule does not remove the Add to Cart button when the product page is rendered via WPBakery custom layout in WoodMart.
Screen shot of our setup attached.
Attached files: Screenshot 2026-05-11 at 12.18.14 PM.png
Screenshot 2026-05-11 at 12.17.16 PM.png
Hi Ian,
Thank you for purchasing our plugin!
Just to confirm, is your main goal to show prices but hide the Add to Cart button for logged-out users?
Non-purchasable rules do not always hide the button completely. This behavior depends heavily on the theme. We mark the product as not purchasable in WooCommerce data, but each theme implements this slightly differently. Some themes only gray out the button, while others hide it entirely. Since you are using a custom product page template with WPBakery, that is likely the issue.
We would like to help you find a solution for this. I believe we can most likely resolve it using a PHP code snippet.
To help us test and provide the exact code needed for your template, would it be possible to share a backend login to the site, or perhaps a staging clone where we can safely troubleshoot this directly?
Kind regards,
Stefan
Anyone home?
Hi Ian,
Thanks for the access details.
It looks like the theme was correctly marking the variations as non-purchasable, but its default behaviour was to still display the button. To resolve this, I added a custom CSS snippet here: https://magnusandsons.com/wp-admin/admin.php?page=wpcode-snippet-manager&snippet_id=10990
I believe it is working correctly now: https://prnt.sc/oXINWLCErLYI
Let me know if you spot any further issues or if there's anything else I can help with.
Kind regards,
Stefan
Issue resolved! Thank you!