How to display minimum price from multiple variations in Woocommerce?

Product variations are a great way to add same products of different sizes and colors etc under a single product.

By default in WooCommerce, variable product displays a range of price from lowest to highest. In this tutorial we’ll learn how to display lowest price among variations.

First of all create a variable product with attributes and different variations.


woocommerceNow, save the product after that.

Now on the front end you’ll see price range for this newly created variable product.

On shop page:

woocommerceAnd the product page:

woocommerceNow, we need to display minimum price among these variations. To do this add the following lines of code at the end of your theme’s functions.php file:

add_filter('woocommerce_variable_price_html', 'custom_variation_price', 10, 2);


function custom_variation_price( $price, $product ) {


     $price = '';


     $price .= wc_price($product->get_price());


     return $price;


You can access functions.php file here:

woocommerceSave the file and after that go to front end again and you’ll see minimum price being displayed.

Here is the shop page:

woocommerceAnd the product page

woocommerceCHEERS J

About the author

We provide WordPress & WooCommerce Support, Maintenance and Development Services.
2 Responses
  1. Stella

    Hey, thank so much for this article.

    The code works great, but I was thinking is it possible to also show text saying “Price from” next to the price?
    How can I include that so the user is sure there is variation in the prices?

Leave a Reply