woocommerce get variation price range 1

woocommerce get variation price range

ID ); // Works for any product type

// Displaying the formatted "Min" - "Max" price range
echo $product->get_price_html();
?>

Here is what the above code is Doing:
1. We’re getting the global $post object.
2. We’re getting the WC_Product_Variable instance object.
3. We’re displaying the formatted “Min” – “Max” price range.

Similar Posts