Website Building » WooCommerce » How Do I Display Variation Price in WooCommerce?

How Do I Display Variation Price in WooCommerce?

Last updated on October 1, 2022 @ 6:41 pm

When you have products with different variations, such as sizes or colors, you may want to display the prices for each variation on your WooCommerce product pages. This can be done using the following methods.

First, you can use the built-in price display options in WooCommerce. To do this, go to WooCommerce > Settings > Products > Display, and then select one of the following options:

· Show prices: This will show the prices for each variation, as well as a “Starting at” price if your variations have different prices.

PRO TIP: If you are using the WooCommerce plugin for WordPress, beware of a recent change in the way variation prices are displayed. Previously, when you set up a product with variations (for example, a t-shirt in different sizes and colors), the price would be displayed as “from $X.” Now, however, the price is displayed as the lowest price for any of the variations. So if you have a product that is $10 in one size and color and $20 in another, the price will now display as $10. This can obviously lead to confusion and frustration on the part of your customers.

To change this behavior back to the way it was, you need to add the following code to your functions.php file:

add_filter( ‘woocommerce_variable_sale_price_html’, ‘wc_hide_variation_price’, 10, 2 );
add_filter( ‘woocommerce_variable_price_html’, ‘wc_hide_variation_price’, 10, 2 );
function wc_hide_variation_price( $price ) {
return false;
}

· Show “Starting at” price only: This will only show the starting price for your variations.

· Hide all prices: This will hide all prices for your variations.

If you want more control over how prices are displayed on your product pages, you can use a plugin like WooCommerce Product Price Manager. This plugin lets you customize the display of variation prices on your product pages, including the ability to show or hide specific variation prices, or to show a minimum and maximum price range for all variations.

Conclusion:
There are two main ways that you can display variation prices in WooCommerce – by using the built-in options in WooCommerce, or by using a plugin like WooCommerce Product Price Manager. Whichever method you choose, make sure that it meets the needs of your store and provides your customers with the information they need to make informed purchase decisions.

Madison Geldart

Madison Geldart

Cloud infrastructure engineer and tech mess solver.