Home > Back-end >  Woocommerce V3 Api Remove Order Limitation of 10
Woocommerce V3 Api Remove Order Limitation of 10

Time:08-15

I am trying to import all the orders through the API (6,500 pieces), but I noticed that the API only makes 10 queries. By adjusting the link domain/wp-json/wc/v3/orders?per_page=100 I can query 100 orders, but I can't get it to query all orders with one call. Is this possible at all.

CodePudding user response:

It is not possible to get all 6500 orders at once, and the API is limited at a maximum of 100 orders per call. The only way of solving this is by making a loop and do multiple calls. However there are 2 HTTP headers that might help you. X-WP-Total and X-WP-TotalPages.

Another solution would be to create your own Wordpress plugin, which adds a new endpoint, and that way you get all your orders

  • Related