Hide trailing zeros on prices

Posted on Leave a comment
5/5 - (208 votes)

The option to show trailing zeros on your prices has been removed in favor of a filter, as of WooCommerce 2.2x.

If you want to hide trailing zeros on your prices add the following code to your Theme’s functions.php file. After doing this your prices will not show the trailing zeros.

 * Trim zeros in price decimals
 add_filter( 'woocommerce_price_trim_zeros', '__return_true' );
Leave a Reply

Your email address will not be published. Required fields are marked *