0

https://example.com/wp-json/wc/v3/products?related_ids=6032

here, above API is displaying all the products, But I need to get only related products by related_ids Attribute, So What's the issue with this API? I have checked others like slug Attribute, works fine.

seems like related_ids not functioning. but I have done it according to the DOC. https://woocommerce.github.io/woocommerce-rest-api-docs/#products

Thanks in advance

  • Welcome to SO. Without your code, the community cannot help you. See How to create a Minimal, Reproducible Example https://stackoverflow.com/help/mcve – jasie Jun 08 '20 at 09:07
  • Check this one out: https://stackoverflow.com/questions/52533166/woocommerce-rest-api-get-multiple-products-by-id – sina farbod Oct 27 '20 at 08:49

1 Answers1

1

wp-json/wc/v2/products?include=5,6,7,8,9

This will get only products with mentioned ids.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 24 '22 at 04:51