This question already has an answer here:
Im wondering how to get an array of all avilable variation ids of a specific product by providing its post id?
I looked into WC_Product_Variation class but seems that it doesnt have the variation id. it would be nice if there is a clean way to get it using Woocommerce API witout having to select it using mysql query.
Thanks
</div>
I found the answer, it was
$handle=new WC_Product_Variable('920');
$variations = $handle->get_children();