Answers for "new WC_Product_Variation($variation_id)"

0

get variation id from by product id

$product = wc_get_product($product_id);
$variations = $product->get_available_variations();
$variations_id = wp_list_pluck( $variations, 'variation_id' );
Posted by: Guest on December-17-2020
0

get variation id from by product id

$product = wc_get_product($product_id);
$current_products = $product->get_children();
Posted by: Guest on December-17-2020

Browse Popular Code Answers by Language