get variation id from by product id

Solutions on MaxInterview for get variation id from by product id by the best coders in the world

showing results for - "get variation id from by product id"
Max
06 Jan 2021
1$product = wc_get_product($product_id);
2$variations = $product->get_available_variations();
3$variations_id = wp_list_pluck( $variations, 'variation_id' );
4
Marnie
09 Nov 2020
1$product = wc_get_product($product_id);
2$current_products = $product->get_children();
3