Closed kdotamoh closed 2 years ago
Good afternoon, I have the same problem with next.js
@kdotamoh I think it may be an authentication issue. I know for stock wp-graphql fields like content
in the Post
type, adding the RAW
param is an authenticated request, which is why it works in GraphiQL (because you're authenticated) but null
in the browser.
@jacobarriola Interesting, that sounds plausible. If that's the case visitors to a website (who aren't authenticated) will be unable to view variable products. Sounds like a bug, no?
Or does the authentication have to be done in development? I don't have access to the project right now, so I can't test this out
Still experiencing the same behaviour with variable products.
raw
worksraw
gives null
In both cases, a user is authenticated.
Sorry if I am missing something?
WooCommerce 7.1.0 WP GraphQL 1.12.1 WPGraphQL WooCommerce (WooGraphQL) 0.11.2
Describe the bug
price(format: RAW)
returnsnull
for VariableProductTo Reproduce Steps to reproduce the behavior:
Expected behavior Get price without a currency symbol
Screenshots In GraphiQL the price displays with no issue but returns null in the browser:
![image](https://user-images.githubusercontent.com/21177558/115909766-7a8d6c80-a45b-11eb-882b-bd485f008440.png)
Desktop (please complete the following information):
Plugin Versions
Additional context It looks like the issue was solved for SimpleProducts #207, but persists for VariableProducts.