Thanushkanth Shan
Thanushkanth Shan

Reputation: 69

How to get related products in WooCommerce REST API(related_ids)?

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

Upvotes: 0

Views: 1715

Answers (1)

Admond Tamang
Admond Tamang

Reputation: 21

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

This will get only products with mentioned ids.

Upvotes: 1

Related Questions