From the conversation started here …
Still trying to track down this bug. Even with the filter commented out we’re still seeing issues with products being hidden from search/category pages.
Here are the steps I’ve taken:
1. Go to /lib/extra/class-groups-extra.php, add a comment to line 35 to disable the visiblity filter.
2. Go to the product settings and verify that no restrictions are set on the product (bear in mind, these are products that never had a restriction on them in the first place).
3. Clear WP Engine Cache, Clear Sucuri Firewall cache.
4. Log out of the WP Admin backend
5. Go to category page, or search for one of the affected SKUs
6. WooCommerce returns “No results found”, or doesn’t display the product on the category page.
7. Disable the Groups plugin entirely
8. Attempt step 5 again, this time it returns the expected results.
This is beyond frustrating at this point, we’re getting numerous complaints and losing sales due to customers not being able to find products on our website. We unfortunately cannot just quit using your plugin, as we do have Pages and other items that do have content restriction settings, but I really need you guys to give us some support here.
This isn’t a caching issue. These products have not and will not ever have any kind of Groups visibility restriction on them. So I’m not sure why cache is being blamed, as these pages wouldn’t have any cached versions of them where the content was hidden. Users logged in as admins can see the products, while guest users cannot, even though there is no setting that should be causing that.
Here is screenshots of the settings of the product, as well as the post meta values for anything I think could be related to your plugin.
Is there some kind of field in the database that could be causing this?
We have a sandbox environment that I will gladly give you access to, which you can use to recreate the issue and fix it.