Closed billerr closed 6 years ago
Thanks for the proposed changes, I've adapted this and added a filter to make it a bit more flexible and moved the check for the wc_query part into the Groups_Extra class. This will be published shortly within version 2.3.1
Hi!
I discovered recently on a website that I maintain that the Groups_Post_Access::posts_where method doesn't apply the proper filtering in product archive pages. The reason was that all tests for the
$filter
boolean currently only check the'post_type'
query var. However, it seems that WooCommerce never sets'post_type' => 'product'
for the archive page wp_query, but instead sets'wc_query' => 'product_query'
(I don't know if this is a recent change in WC or if it's particular to our website environment)In any case, I added this specific check in the Groups_Post_Access class in pull request #81