Skip to content

Instantly share code, notes, and snippets.

@NiklasHogefjord
Created November 14, 2016 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NiklasHogefjord/72a79fc3a8b9e8f052d82a5acc4d53a9 to your computer and use it in GitHub Desktop.
Save NiklasHogefjord/72a79fc3a8b9e8f052d82a5acc4d53a9 to your computer and use it in GitHub Desktop.
Add this code in your themes functions.php or as a separate plugin.
<?php
/**
* Trim zeros in price decimals in WooCommerce.
* For instance $200.00 is displayed as $200.
**/
add_filter( 'woocommerce_price_trim_zeros', '__return_true' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment