[英]Is it possible to select more than one status in the WooCommerce API orders endpoint?
我正在使用REST API(v1,OAuth)从WooCommerce网站阅读订单,过滤订单状态:
http://mypage.com/wc-api/v1/orders?status=on-hold
工作正常。
现在我想过滤多种状态。 这可能吗? 喜欢:
http://mypage.com/wc-api/v1/orders?status=on-hold,pending
本网站建议:
您可以使用
?status
参数检索具有特定状态的订单, 使用逗号分隔多个状态 。
(我已经尝试了,但是我无法使用逗号构建有效的oauth_signature
,可能是某种编码问题。所以在我继续尝试之前,我想先知道是否有多种状态。)
我终于找到了无法构建正确的oauth_signature
:逗号必须进行双重编码(有关详细信息,请参阅此处 )。
答案: 是的 - 可以选择以逗号分隔的多个状态:
http://mypage.com/wc-api/v1/orders?status=on-hold,pending
这适用于v1
和v2
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.