Skip to content

Instantly share code, notes, and snippets.

@kloon
Last active September 8, 2015 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save kloon/9109978 to your computer and use it in GitHub Desktop.
Save kloon/9109978 to your computer and use it in GitHub Desktop.
WooCommerce 2.1 show trailing zeros
<?php
// Show trailing zeros on prices, default is to hide it.
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;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment