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

Autoplay Videos in Divi

Autoplay Videos in Divi

Setting videos to autoplay has bugged website developers for years, and in Divi there are no default options to Autoplay your videos. Some people suggest setting your video as a background to allow autoplay, but this comes with its own issues (like setting the...

How to Choose the Best Website Address (Domain/URL)

How to Choose the Best Website Address (Domain/URL)

This article was first written 24 Sept 2011, and has been updated August 2020. What is a website address? Your website address, or domain name, is used to identify and access your website. It looks something like No two website addresses...


Submit a Comment

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