Hide trailing zeros on prices

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’ );
Was this article helpful?
Dislike 0
Views: 0


Log in

Create an Account
Back to Top