How to Show Trailing Zeros on Prices in WooCommerce

Here’s a handy WordPress code snippet which allows you to display trailing zeros on prices in WooCommerce.

Quick Tip : How to Change WooCommerce Shop Page Title?

All you need to do is copy the following code and paste it inside your functions.php file located inside your theme directory.

add_filter( 'woocommerce_price_trim_zeros', 'wc_hide_trailing_zeros', 10, 1 );
function wc_hide_trailing_zeros( $trim ) {
    // set to false to show trailing zeros
    return false;



Leave a Comment.