How to Change WooCommerce Variable product pricing by SKU or visible children id

admin2025-06-03  2

I'm trying to Change WooCommerce Variable product pricing by SKU or visible children id. When I see the Variable product information by using this Code :

$product = new WC_Product_Variable(49);
$variation_data = $product->get_children();
print_r($variation_data );

It returns an array that Clearly shows variation children ids

 Array(
                [0] => 281
                [1] => 282
                [2] => 280
 )

On the Other Hand, if I see Product meta information i see three Price. but there is no visible relation betwine Product Variation and their prices.

Guys, do you have any Suggestion How May I Change the Prices programmatically from my Plugin. Thank you.

Regards javmah

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748919493a314819.html

最新回复(0)