Skip to content

Query orders return empty response #840

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

Open
Sylvesterx1 opened this issue Mar 8, 2024 · 3 comments
Open

Query orders return empty response #840

Sylvesterx1 opened this issue Mar 8, 2024 · 3 comments
Labels
awaiting author response Awaiting response from Issue/PR author question Further information is requested

Comments

@Sylvesterx1
Copy link

Sylvesterx1 commented Mar 8, 2024

When I query orders from wordpress dashboard then I see correct response.

I know query orders is restricted.

I build headless admin, and I want get all orders as admin user. For this I generate public_key and secret_key with admin privilages.

I try add in headers, also in postman I try switch to oAuth 1.0 and here I provide consumer key and private key. But still I see empty result.

How can I query orders as admin without need get woocommerce session ? (i need get all orders created in system from all customers).

For REST API I can include public_key and secret_key and I see correct response all orders. I need do the same using graphql.

@ZeroPie
Copy link

ZeroPie commented Jun 4, 2024

The query does not work on my end either, im using 0.19.
I also get responses with the rest api, but no responses with the grapqhl query

/wp-json/wc/v3/orders?email=[email protected] will give me a response

query getOrders ($billingEmail: String) {
 orders(where: { billingEmail: $billingEmail }) {
        nodes {
          date
	    total
	    status
        }
    }
}

wont

@kidunot89
Copy link
Collaborator

@Sylvesterx1 @ZeroPie Make sure you have all web server configures and plugins installed/activated for processing you Authorization headers.

@kidunot89 kidunot89 added question Further information is requested awaiting author response Awaiting response from Issue/PR author labels Mar 11, 2025
@ZeroPie
Copy link

ZeroPie commented Mar 11, 2025

Ty, what exactly differs here compared to the setup for other queries? since the other queries do work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting author response Awaiting response from Issue/PR author question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants