Remove Trailing Zeros on Woocommerce Prices

Aug 18, 2020 | WooCommerce, Wordpress

Want to get rid of those annoying zeros after the decimal place on your website? Fortunately it’s nice and easy!

Simply open up your theme functions.php file, and add the following to the end.

add_filter( 'woocommerce_price_trim_zeros', 'joy_hide_trailing_zeros', 10, 1 );
function joy_hide_trailing_zeros( $trim ) {
    return true;

Did you find this helpful? Do you have any questions? We’d love to hear from you – drop us a comment below.

Browse More Hints & Tips

8 Must-Do Things When Launching a New Website

8 Must-Do Things When Launching a New Website

So you're ready to launch your new website? That's awesome! When launching your website, there's a lot of things you MUST do in order to give your website the best chance of success. Some of these things will help your SEO, others will help you manage your website....


Submit a Comment

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