valu-digital / wp-graphql-polylang

WPGraphQL Polylang Extension for WordPress
https://packagist.org/packages/valu/wp-graphql-polylang
GNU General Public License v2.0
129 stars 22 forks source link

language filter is not working for woocommerce products #49

Closed vstrelianyi closed 3 years ago

vstrelianyi commented 3 years ago

No language field in where:{ } parameter when querying woocommerce products

sslnyx commented 3 years ago

query MyQuery { productCategories(where: {language: ZH}) { edges { node { id name products { nodes { name id } } } } } }

I can get the language by "productCategories", then get the products from the category.

vstrelianyi commented 3 years ago

Hm.. it seems that there is no "language" filter field in the schema image , so I'm getting an error image

sslnyx commented 3 years ago

productquery

Just fresh install a demo project. I have it with the latest version 0.5.0 of this plugin.

https://github.com/valu-digital/wp-graphql-polylang/releases

vstrelianyi commented 3 years ago

ok, I have found the issue I needed to check the Product categories box in Polylang settings image

vstrelianyi commented 3 years ago

@sslnyx thx for your time the issue is closed, I hope our dialog will be useful for others who might face it.. )