Image default

How to Show Trailing Zeros on Prices in WooCommerce

If you are looking to add trailing zeros to your WooCommerce prices then there is a plugin for this, but I have created a simple code snippet that shows trailing zeros on prices in WooCommerce.

All you have to do is just to add this code in your theme’s functions.php file.

add_filter( 'woocommerce_price_try_zeros', 'wc_hide_trailing_zero', 10, 1 );
function wc_hide_trailing_zero( $try ) {
// set to false to show trailing zero
return false;


Related posts

How to Customize WooCommerce Product Variations


How To Add WooCommerce Custom Order Status


How to Customize Add to Cart Button in WooCommerce