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

                [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.

enter image description here

enter image description here

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

Regards javmah

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.