We have discovered an incompatibility issue with Bricks Builder and the Wholesale Suite plugin (https://wholesalesuiteplugin.com/) where products that are restricted to be visible to wholesale roles are still visible and are listed in Bricks archive templates.
When clicking the product link, we are redirected to the shop page instead of being shown the product page, but we can still add the product to our cart from the listing/archive pages. The products should not be visible at all in the archive/list of products.
We know it’s a compatibility issue with Bricks and Wholesale Suite, because if we install the WooCommerce StoreFront theme, the issue is no longer present and the products that are restricted to wholesale roles are not visible to anyone but customers logged in with those roles.
In Bricks Builder, I am using the default Product element to list products, with no major changes to the query except for 32 products per page and sorting by menu order.
Bricks, Woo and all plugins and core are up to date.
I am not familiar with the plugin, so it is possible that there is an incompatibility. However, I cannot test this myself, as product visibility is a premium feature and we do not currently have a license for this plugin.
Accordingly, it would be great if you could provide us with login credentials to a staging environment (help@bricksbuilder.io with a link to this thread using the email address associated with your account), so we can check what’s going on.
Thanks so much for your response. I’ve sent an email to help@bricksbuilder.io with a video demo of the issue and staging logins.
I believe it’s an issue with the way Bricks or the product element specifically is hooking into the core woocommerce loop for displaying products, and is missing something. I’m by no means an expert on these things, so looking forward to you guys looking into it and hopefully a resolution.
Just a quick update. I have been working with your team - who are great by the way! - and the bug was located in the product element. There was no issue when using Custom Query loop. Bricks team has offered to implement a fix.
Wholesale Suite Plugin support also came to the party and provided a code snippet fix so that the Bricks Products widget now filters products using WWPP_Query::pre_get_posts_arg, which is the same method Wholesale Suite uses for WooCommerce widgets and shortcodes.
Hopefully the bug fix for the Products element will be rolled out in an update. Kudos to both teams for being responsive, great to deal with and both resolving the issue.