-
-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order query is returning null #352
Comments
Sounds like you need to add authentication, since the |
@pmventura The |
@jacobarriola @kidunot89 I see. Thank you for the explanation |
@kidunot89 I'm trying the get an order of a guest user and its returning null. I updated the billing email of the guest user is already updated on the session and I'm passing the woocommerce-session token on the request header. But still, the order query is returning null. Im using the plugin version 0.10.4. Am I passing the session correctly? The same query for logged-in users are working as expected. Any help will be appreciated. |
@brianpereradap How are you creating the guest order? |
@kidunot89 Im using the checkout mutation to create the order and then use Paypal to collect the payment. Once the payment is completed I used the updateOrder mutation to update the status from Pending to Processing (had to add graphql_woocommerce_authorized_to_update_orders filter to get past auth). I can confirm that the customer->billing->email and order billing email are the same Pleas note that for guest users get order query request my authorization header is empty. Is this the reason? If so how do I get the auth token for guest users? |
@brianpereradap Can you try removing the authorization header entirely from the request? Not even an empty authorization header. |
@kidunot89 tried adding an empty auth header, but it didn't work. I was using the order query. I was able to get the guest customer order information using the customer query instead. I was referring to the following ticket #432. I guess this would be sufficient for now. @kidunot89 thanks for responding to my queries. Really appreciate your contribution. |
@brianpereradap Your not supposed to use the |
Hi all, I'm trying to create a headless admin panel using WPGRAPHQL for my client. I've done it already using rest api (with some hacks to add featured image url in function.php etc) & woocommerce oauth. It works with REST API but it doesn't seem to work with WPGRAPHQL. I'm simply trying to "GET" the orders but always returns null even with correct jwt token authorization there. Is there anything that could be conflicting? I'm using JWT Auth plugin for that. Do I have to use https://github.com/wp-graphql/wp-graphql-jwt-authentication for it to work? (GRAPHiQL works fine when i'm logged in in wordpress)
body:
response:
|
Hi @brianpereradap Furthermore we can see that this issue is still unresolved. |
Describe the bug
I'm trying to extract a particular order via Postman but it's returning a
null
order. However, when trying to query via GraphiQL, it works as expected.Query:
Expected behavior
Should return order
Screenshots
![Screenshot 2020-10-22 at 1 52 51 PM](https://user-images.githubusercontent.com/4361782/96830346-e4f22f80-146d-11eb-8c87-5dbd7729a043.png)
The text was updated successfully, but these errors were encountered: