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

5 Best WooCommerce Affiliate Plugins


How to Add Variable Products in WooCommerce


Change Link “Add to Cart” for a Link to the Product in WooCommerce