Updated wc_get_orders and WC_Order_Query (markdown)

Claudiu Lodromanean 2017-05-16 13:51:34 -07:00
parent 31ca859f43
commit 598daf854e
1 changed files with 7 additions and 6 deletions

@ -71,24 +71,25 @@ $orders = wc_get_orders( $args );
**type**
Valid values
Accepts a string: 'shop_order' or 'shop_order_refund'.
```
// All orders
// Get refunds in the last 24 hours.
$args = array(
'type' => 'shop_order_refund',
'date_created' => '>' . ( time() - DAY_IN_SECONDS )
);
$orders = wc_get_orders( $args );
```
**version**
Valid values
Accepts a string: WooCommerce version number the order was created in.
```
// All orders
// Get orders created during WooCommerce 2.6.14
$args = array(
'version' => '2.6.14'
);
$orders = wc_get_orders( $args );
```