Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to show trailing zeros on prices in WooCommerce
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
// Show trailing zeros on prices.
add_filter( 'woocommerce_price_trim_zeros', 'wc_hide_trailing_zeros', 10, 1 );
function wc_hide_trailing_zeros( $trim ) {
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment