为什么具有相同 date_min、date_max 的 WooCommerce API 返回 0 个客户?
我正在对 WooCommerce 进行简单的 API 调用,以每天吸引所有新客户。
如果我设置不同的 date_min 和 date_max ,它就可以正常工作。例如:example.com/wp-json/wc/v3/reports/sales?date_min=2022-02-26&date_max=2022-02-27
2 月 26 日,我收到 2 位客户:
"totals": {
"2022-02-26": {
"sales": "338.20",
"orders": 2,
"items": 2,
"tax": "60.99",
"shipping": "0.00",
"discount": "0.00",
"customers": 2
},
"2022-02-27": {
"sales": "364.65",
"orders": 2,
"items": 2,
"tax": "65.76",
"shipping": "0.00",
"discount": "0.00",
"customers": 0
}
}
但如果我设置相同的 date_min 和 date_max 客户返回 0。例如example.com/wp-json/wc/v3/reports/sales?date_min=2022-02-26&date_max=2022-02-26
2 月 26 日,我收到 0 个客户:
"totals": {
"2022-02-26": {
"sales": "338.20",
"orders": 2,
"items": 2,
"tax": "60.99",
"shipping": "0.00",
"discount": "0.00",
"customers": 0
}
}
我的情况我失踪了?
感谢您的帮助:)
I'm making a simple API call to WooCommerce to get all the new customers on a daily basis.
If I set different date_min and date_max it works perfectly. For example: example.com/wp-json/wc/v3/reports/sales?date_min=2022-02-26&date_max=2022-02-27
For February 26th, I get 2 customers:
"totals": {
"2022-02-26": {
"sales": "338.20",
"orders": 2,
"items": 2,
"tax": "60.99",
"shipping": "0.00",
"discount": "0.00",
"customers": 2
},
"2022-02-27": {
"sales": "364.65",
"orders": 2,
"items": 2,
"tax": "65.76",
"shipping": "0.00",
"discount": "0.00",
"customers": 0
}
}
But If I set the same date_min and date_max customers return 0. For example example.com/wp-json/wc/v3/reports/sales?date_min=2022-02-26&date_max=2022-02-26
For February 26th, I get 0 customers:
"totals": {
"2022-02-26": {
"sales": "338.20",
"orders": 2,
"items": 2,
"tax": "60.99",
"shipping": "0.00",
"discount": "0.00",
"customers": 0
}
}
What I'm missing?
Thanks for help :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论