Closed Voidmine closed 7 years ago
This repository is just a wrapper around the php woocommerce rest api
for easier integration into Laravel. That's why you can (normally) apply the same syntax as documented here:
http://woocommerce.github.io/woocommerce-rest-api-docs
After some research I unfortunately found this: https://github.com/woocommerce/woocommerce/issues/11996#issuecomment-269487111
Looks like filter
will be removed :-(
Just found out that it also stopped working for me ... ... will have a deeper look into it
I found the solution in the docs: https://woocommerce.github.io/woocommerce-rest-api-docs/#index
$params = [
'after' => '2017-01-24T00:00:00'
];
return Woocommerce::get('orders', $params);
The order filter in the example code doesn't appear to be functioning correctly.
If I run the above code then I get the default 10 results without any filtering (it returns orders from before that date). Similarly, if I add a per_page parameter of 100, then it will return 100.
I initially discovered this while trying to figure out how to only show variable products so I could try to figure out how to list their variations (trying to get a master list of products with SKUs - like you can do in a WP query by searching for posts with type 'product' and 'product_variation'). Not sure on the best way to do it via the API.
PS - looking forward to your planned addition of the get response header functions so we can use paginated results without hardcoding loop values. Thanks for the hard work!