New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REST API to include 'modified_before' and 'modified_after' parameter support #29461
Comments
Hi @databuzz Thank you for taking the time to share this idea, we really appreciate your help. This idea had been discussed previously in the now deprecated REST API repository Adding the |
While this is clearly a great improvement/idea we won’t be able to tackle it in the upcoming weeks. We’re going to add it to our backlog where it will be considered for future releases. Stay tuned for updates. |
Thanks for the suggestion @databuzz. We'll keep an eye on the popularity of this request :) |
In our integration project we need to be able to get the changed orders since a certain point (date/time). The 'after' and 'before' parameters don't allow us to do that because they only focus on the 'date_created'. Without this functionality we are forced to overload both systems: the wc api and ours, with multiple extra requests that are mostly wasted. |
I am like everyone trying to create integration with erp system or some other system and i need to get orders by modified date, but sadly this future has been requested bunch of times in the last 3 - 4 years and still hasn't been implemented. So like everyone i would request implementation of this feature. |
Hoping this can be prioritized. It looks like this has been a feature that has been requested by dozens of developers since 2017. I imagine a large percentage of API consumers need this. Filtering by modified date should be an option for orders, products, etc. It's essential for any consumer that is looking to keep a rolling copy of WooCommerce orders in their own repository for analytics, accounting, etc. There have been comments and suggestions to add a Wordpress filter to allow for the date_modified field to be exposed via an API call. (add_filter('woocommerce_rest_orders_prepare_object_query',........) This works for people who have easy control of the wordpress/woocommerce site, but for cases like mine where I have numerous woocommerce clients I do API calls for and do not have access to their wordpress/woocommerce websites, I cannot realistically ask each of them and any future clients to manually add that wordpress code on my behalf. Right now I have to call the API every hour for each client and search ~14 days back based on the created date for orders. This is unreasonable and unnecessarily loads servers. Please prioritize this if possible. |
Thanks for all the votes. I'm going to reopen this issue and give it a high priority. It might still be a while until we're able to tackle this, but we'll consider the higher priority as we plan our future work. |
Very good to see that this is getting priority. Will this be applied to \wc\v3 ? Thanks in advance |
Note that to support this, we would need to:
|
Considering all reactions and comments on the issue in the old repo, I think it's obvious how important this feature is, and how long people have been asking for it. |
Is your feature request related to a problem? Please describe.
I need to query the WooCommerce REST API for any Products which have been modified since a specified timestamp, and pull those down and update our internal inventory systems. The current list of parameters for listing all products includes
after
andbefore
but these reference the date created. We need the equivalent of these for the date modified.Describe the solution you'd like
Add 2 additional parameters to the Products endpoint:
modified_before
andmodified_after
which query the date modified fieldDescribe alternatives you've considered
I haven't been able to find a workaround for this so far.
Additional context
This has been asked about a number of times on Stackoverflow and the WordPress forums here.
The text was updated successfully, but these errors were encountered: