-
- Notifications
You must be signed in to change notification settings - Fork 143
Description
Describe the bug
A clear and concise description of what the bug is.
- It's not possible to filter the
attributesfield using thetypein thewhereinput field. It returns unfiltered results. globalAttributesfield return all attributes (including local attributes)localAttributesfield return all attributes (including global attributes)globalAttributesallows selecting thetypein thewhereinput fieldlocalAttributesallows selecting thetypein thewhereinput field
To Reproduce
Steps to reproduce the behavior:
- Create a Variable product
- Assign attributes to create the variations
- Also assign it a local attribute
Querying globalAttribute return also localAttributes

Because of the above, if you select terms, you will get a critical error:

While querying localAttributes, globalAttributes are also returned:

While querying attributes and using the where input field, results are not filtered and everything is returned:

There is no reason to have in the globalAttributes / localAttributes a where selector for the type:

Expected behavior
Remove the unnecessary input field to select type on globalAttributes and localAttributes.
Return the correct data based on the selection.
Plugin Versions
- WooGraphQL Version: Latest
- WPGraphQL Version: Latest
- WordPress Version: Latest
- WooCommerce Version: Latest
Additional context
https://dropshiptool.eu/explanation/woocommerce-product-attributes-global-vs-local/