是否可以在 WooCommerce API 订单端点中 select 多个状态?

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

This site 这么建议:

You can retrieve orders with a specific status using the ?status parameter, using commas to separate multiple statuses.

(我已经尝试过了,但是我无法用逗号构建一个有效的 oauth_signature,可能是某种编码问题。所以在我继续尝试之前,我想知道是否有多个首先是可能的状态。)

终于找到无法正确构建oauth_signature的原因:逗号要双编码(详见here

回答: - 可以select多个状态,逗号分隔,就像这样:

http://mypage.com/wc-api/v1/orders?status=on-hold,pending

这适用于 v1v2