woocommerce / woocommerce-rest-api

This is the WooCommerce core REST API Package. It runs standalone as a feature plugin too.
71 stars 46 forks source link

Suggestion: Add product tag information to order lines / filter orders based on the product tags #257

Open SanderCMD opened 3 years ago

SanderCMD commented 3 years ago

In my system all products can have 1 tag assigned to them out of a list of tags. Orders can only have products in them that all have the same specific tag in common.

I want to retrieve all orders based on the tag that the products hold, but right now i have to do that like this: Firstly I'm retrieving the productid's of all products with the tag. Then i get all orders and filter based on the first order line having a product with that specific tag.

It would be great if the tag information gets included in the order lines so that i can do this directly. Is there any better way to do this perhaps? Because my solution is not very efficient or fast.