You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The category filter on products doesn't work in some use cases. Specifically when trying to retrieve products using the query related to a product attribute.
To Reproduce
Steps to reproduce the behavior:
Create a new product attribute.
Query the products using the subfield of your paYourProductAttribute query.
Try to filter by category.
See error (hopefully)
Expected behavior
The filter should work no matter where it's applied (unless I'm missing something).
Plugin Versions
WooGraphQL Version: 0.12.1
WPGraphQL Version: 1.14.1
WordPress Version: 6.2
WooCommerce Version: 7.6.0
Additional context
Those are some example queries ran on my end:
@lbenevento and the product queried isn't under both the vegetables and fruits categories? Because where.categoryId param on the ProductAttribute.products connection will only filter the products not their productCategories.
Thank you for the answer but I'm not sure I got what you mean.
Anyway no product has both categories and the queried product's category is visible in the example queries I posted!
Describe the bug
The category filter on products doesn't work in some use cases. Specifically when trying to retrieve products using the query related to a product attribute.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The filter should work no matter where it's applied (unless I'm missing something).
Plugin Versions
Additional context
Those are some example queries ran on my end:
Operation:
Results in:
Operation where category filters are working:
Results in (result cut but the complete version indeed contains just the products with the correct category):
Operation where category filters are NOT working.
Results in (again, cut to avoid useless code but it's enough to notice that even the first product has the wrong category):
The text was updated successfully, but these errors were encountered: