Get all product variations of a product given its ID in Woocommerce

$handle=new WC_Product_Variable('12');
        $variations1=$handle->get_children();
        foreach ($variations1 as $value) {
        $single_variation=new WC_Product_Variation($value);
            echo '';
}