Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 65051

Can’t list orders using WC REST API v3, although products and customers work

$
0
0

Replies: 0

Hi all,

I currently run a webshop on WordPress 5.4.2 and WooCommerce 4.5.2.

As instructed in the docs, I am using the latest v3 REST API for WooCommerce.

With this API, I can perfectly list products and customers, but whenever I try to list orders I always get an empty array as answer. (Postman result = [])
I do have several orders in the WooCommerce dashboard, so don’t really know what’s going wrong here.

This is how I construct my GET requests:
https://www.site.com/wp-json/wc/v3/products?consumer_key=ck_xxx&consumer_secret=cs_xxx
https://www.site.com/wp-json/wc/v3/customers?consumer_key=ck_xxx&consumer_secret=cs_xxx
https://www.site.com/wp-json/wc/v3/orders?consumer_key=ck_xxx&consumer_secret=cs_xxx

Any ideas what’s preventing me from listing orders correctly? Is there any special about listening orders that I might have overlooked?

Thanks in advance 🙂


Viewing all articles
Browse latest Browse all 65051

Trending Articles