woocommerce rest api v1日期过滤器

时间:2016-08-25 22:48:23

标签: woocommerce-rest-api

我正在使用WooCommerce rest api v1,其中我试图获取2016年6月创建的所有客户。以下是我使用的代码: -

$customers = $woocommerce->get('customers', array( 'filter[date_created_min]' => '2016-06-01', 'filter[date_created_max]' => '2016-06-30' ) ) ;

不幸的是,它正在返回所有记录而忽略了过滤器。下面是它在数组中返回的1条记录的示例: -

Array
(          
        [id] => 3
        [date_created] => 2016-08-08T15:26:49
        [date_modified] => 2016-08-10T22:17:44
        [email] => manager@manager.com
        [first_name] => Shop
        [last_name] => Manager
        [username] => Manager
        [last_order] => Array
            (
                [id] => 
                [date] => 
            )

        [orders_count] => 0
        [total_spent] => 0.00
        [avatar_url] => http://2.gravatar.com/avatar/?s=96
        [billing] => Array
            (
                [first_name] => shop
                [last_name] => manager
                [company] => test company 1
                [address_1] => test
                [address_2] => 
                [city] => test
                [state] => PB
                [postcode] => 1111
                [country] => test
                [email] => shop@manager.com
                [phone] => 123456
            )

        [shipping] => Array
            (
                [first_name] => shop
                [last_name] => manager
                [company] => test company 1
                [address_1] => test
                [address_2] => 
                [city] => test
                [state] => PB
                [postcode] => 11111
                [country] => test
            )

请帮我知道正确的日期过滤器。我已经尝试了'created_at_min'/'created_at_max',但它无效。提前谢谢!

0 个答案:

没有答案