skip to Main Content

I want to retrieve purchasable products using API v3 and OAuthRequest. There is no clue in official document

I could get some other feature such as

/wp-json/wc/v3/products/?status=publish

but I don’t know anything more specific.

In the JSON object there is a “purchasable” flag when retrieve products, but I want to specify this in the request URL.

Thanks in advance.

2

Answers


  1. No, filtering a product via purchasable flag is not supported by the API v3. You have to retrieve the products and filter them via purchasable flag manually when the response is returned to you.

    Login or Signup to reply.
  2. as touhid said. you need to add a simple if or filter product.purchasable == true in your response data.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search