Skip to content

Instantly share code, notes, and snippets.

@claudiosanches
Last active August 8, 2024 10:48
Show Gist options
  • Save claudiosanches/8983212 to your computer and use it in GitHub Desktop.
Save claudiosanches/8983212 to your computer and use it in GitHub Desktop.
WooCommerce - Stop to trim zeros!
add_filter( 'woocommerce_price_trim_zeros', '__return_false' );
@indikatordesign
Copy link

Hey, thanks a lot! It works nice..

@MarianneTopping
Copy link

Works :)

@Aozuas
Copy link

Aozuas commented Feb 18, 2014

Just what I need! Obrigado novamente, mestre!

@amatzon
Copy link

amatzon commented Feb 27, 2014

Just for the record, from v2.1.3 default status is flipped. Enable it with:

add_filter( 'woocommerce_price_trim_zeros', '__return_true' );

@llest
Copy link

llest commented Apr 13, 2014

Weird thing is that it doesn't work for me. Not one way nor the other. I have WC 2.1.6.

@mitchellkrogza
Copy link

Works BUT doesn't work for sale prices which still show .00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment