Woocommerce api只返回20个结果

时间:2016-05-09 14:14:50

标签: woocommerce

我使用位于此处的PHP的woocommerce apii https://github.com/kloon/WooCommerce-REST-API-Client-Library

我尝试过使用

  1. $all_orders = $client->orders->get(null, array( 'post_status' => 'wc-processing') );
  2. $all_orders = $client->orders->get(null, array( 'post_status' => 'processing') );
  3. $all_orders = $client->orders->get(null, array( 'status' => 'wc-processing') );
  4. $all_orders = $client->orders->get(null, array( 'status' => 'processing') );
  5. 仅返回20个结果。有71个处理订单。

    我如何解决?

1 个答案:

答案 0 :(得分:0)

$all_orders =  $client->orders->get(null, array('filter[limit]' => '-1' ,'status' => 'processing') );

获取所有处理订单或

$all_orders =  $client->orders->get(null, array('filter[limit]' => '500' ,'status' => 'processing') );

获取500个处理订单。