Skip to content

Instantly share code, notes, and snippets.

@frankschrijvers
Last active March 2, 2016 15:13
Show Gist options
  • Save frankschrijvers/55a39783fec6319e4d84 to your computer and use it in GitHub Desktop.
Save frankschrijvers/55a39783fec6319e4d84 to your computer and use it in GitHub Desktop.
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