Website Building » WooCommerce » How Do I Turn Off Rounding Prices in WooCommerce?

How Do I Turn Off Rounding Prices in WooCommerce?

Last updated on January 18, 2023 @ 3:10 pm

If you are running a WooCommerce store, you may have noticed that prices are rounded to the nearest whole number by default. For example, if an item costs $1.99, it will be rounded up to $2.00.

While this is not a huge deal, it can sometimes create issues with pricing accuracy, especially if you have a lot of products with different prices.

PRO TIP: If you are not careful, turning off rounding prices in WooCommerce can result in your prices being displayed incorrectly on the frontend of your store. This can cause confusion for your customers and may result in lost sales.

The good news is that you can easily turn off rounding prices in WooCommerce. Simply add the following code to your theme’s functions.php file:

function wc_round_off_price( $price ) {
return $price; }
add_filter( 'woocommerce_price_numeral_decimals', 'wc_round_off_price' );

After adding this code, prices will no longer be rounded in WooCommerce.

Dale Leydon

Dale Leydon

Sysadmin turned Javascript developer. Owner of 20+ apps graveyard, and a couple of successful ones.