woocommerce / woocommerce/wc-api-php

Get all orders for the logged in customer

Open
#341 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.