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
When trying to query products by status (draft, trash...), I'm only receiving products that I'm the author of. Considering I'm testing as an admin, all products with this status should be returned. I'm using the last versions of wpgraphql and wpgraphql-woo
Expected behavior
It will only return the products that you're author of.
Possible solution
I studied the code and found an incompatibility between wp-graphql and wp-graphql-woocommerce. Product and all Woocommerce post types have the 'skip_graphql_type_registry' option. This way, all Woocommerce post types are being ignored and are seen as "private" instead of "public" on this line
What I made to fix it: used this filter to return false. That way the code will follow the native flow and check whether or not the user is able to see.
The text was updated successfully, but these errors were encountered:
Describe the bug
When trying to query products by status (draft, trash...), I'm only receiving products that I'm the author of. Considering I'm testing as an admin, all products with this status should be returned. I'm using the last versions of wpgraphql and wpgraphql-woo
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It will only return the products that you're author of.
Possible solution
I studied the code and found an incompatibility between
wp-graphql
andwp-graphql-woocommerce
. Product and all Woocommerce post types have the 'skip_graphql_type_registry' option. This way, all Woocommerce post types are being ignored and are seen as "private" instead of "public" on this lineWhat I made to fix it: used this filter to return false. That way the code will follow the native flow and check whether or not the user is able to see.
The text was updated successfully, but these errors were encountered: