WooCommerce return related products

Question

I’m making a mobile app for my store.
What I want is that I when fetch the products from REST API, it should not just contain the related_ids but I just want to add an extra property to each product and that is related_products which should hold the actual product data of those related ids.

Because loading each related products separately is cumbersome user experience.
How can I customize the REST API to include the related_products property ?
Thanks in advance

0
, , Lint 1 year 2020-07-25T10:11:00-05:00 0 Answers 47 views 0

Leave an answer

Browse
Browse