woocommerce / woocommerce/wc-api-php
Get all orders for the logged in customer
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 546
- Forks
- 158
- Avg merge
- 3h 21m
- Merged PRs (30d)
- 2
Description
Hi,
I'm trying to get all orders for the logged in customer, using this /wp-json/wc/v3/orders however I keep getting this error message
{
"code": "woocommerce_rest_cannot_view",
"message": "Sorry, you cannot list resources.",
"data": {
"status": 403
}
}
It only works when I use the username/password of an Admin user, I know that woocommerce requires REST API keys, however i'm using an App with the woocommerce and I just want to get all orders of the logged in customer without having to go through and create an API key each time a new user registers.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the /wp-json/wc/v3/orders endpoint and the woocommerce_rest_cannot_view response, including how authentication and customer permissions are handled. No repository files or tests are named; done would require an agreed implementation or documented supported approach for retrieving only the logged-in customer's orders without creating per-user API keys.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100