How to find WooCommerce variation by attributes?

I’m working on adding custom functionality on top of Woocommerce, and I need to find the variation id for a variable product based on the attributes I’ve selected.

For example, if I have a burrito with a meat attribute being ‘Chicken’, ‘Steak’, and ‘Pork’, then there are three variations. How would I find the variation with the attribute being chicken?

Read more here: How to find WooCommerce variation by attributes?

Leave a Reply

Your email address will not be published. Required fields are marked *