Answer the question
In order to leave comments, you need to log in
How to get user by phone in Woocommerce REST Api?
You need to get user data by his phone number. I use the following request
https://site.com/wp-json/wc/v3/customers?billing={ "phone":"(1555) 555-5555"}
In response, I get a list of all customers.
Answer the question
In order to leave comments, you need to log in
As far as I can see, in the GET /customers method there is only one way to filter - by customer status: https://woocommerce.github.io/woocommerce-rest-api...
In this case, just add your method. This is easy to do in WordPress: https://wp-kama.ru/handbook/rest/extending/routes-...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question