WooCommerce Rest Api:按特定日期获取订单

问题描述 投票:3回答:1

我想使用WooCommerce Rest Api在特定日期获得订单。 Api提供仅接受ID的订单方法。但是我想在特定日期获得特定订单。

我该如何实现?

谢谢。

php wordpress wordpress-plugin woocommerce wordpress-rest-api
1个回答
0
投票

为此,您需要查看WooCommerce orders端点。特别是围绕afterbefore过滤器。

例如

获取wp-json / wc / v3 / orders?after = 2016-06-22T00:00:00&before = 2016-06-22T23:59:59per_page = 100

© www.soinside.com 2019 - 2024. All rights reserved.