Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter arrchnumbat

    (@arrchnumbat)

    Thanks for the reply.

    I’ve tried to do some more testing, but I can confirm that the filtering is not happening as expected. This is effectively what I am querying using cURL (key and url masked):

    curl --request GET \
    --url 'https://******.com/wp-json/wc/v3/orders?meta_key=_shipping_country&meta_value=AU' \
    --header 'Authorization: Basic ********'

    What I am receiving is all of the orders, the first few being from the US in my case. So I know it’s not the endpoint or authentication. I’ve also tried with the _billing_country and meta values to no effect. I’ve also tried a corresponding query on a different installation (swapping the addres and auth key).

    So that’s why I was wondering is there something else I may need to enable for this filtering to happen.

    Thread Starter arrchnumbat

    (@arrchnumbat)

    Hi, thank you so much for the fast reply!

    It looks like the meta_key and meta_value will do what I want. I’m just after a list of orders for a particular country via the REST API. But when I test it, it looks like those parameters are not doing the filtering as I would expect.

    Is there any configuration that needs to be done to enable the meta_key parameter?

Viewing 2 replies - 1 through 2 (of 2 total)