Home » Php » Retrieve products by meta_data value

Retrieve products by meta_data value

Posted by: admin September 25, 2018 Leave a comment

Questions:

I’m using the WooCommerce REST API v2 (the recent one, not the legacy one).

All my products have a specific meta_data field called “X_id”.

Using the REST API, I would like to retrieve products based on the value of that specific meta_data field. For example, retrieve the product which has “X_id=123”.

Answers: