Created
March 2, 2016 15:12
-
-
Save frankschrijvers/7e3b647057366a67da7e to your computer and use it in GitHub Desktop.
How to hide trailing zeros on prices in WooCommerce
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
// Hide trailing zeros on prices. | |
add_filter( 'woocommerce_price_trim_zeros', 'wc_hide_trailing_zeros', 10, 1 ); | |
function wc_hide_trailing_zeros( $trim ) { | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment