Skip to content

Instantly share code, notes, and snippets.

@claudiosanches
Last active August 8, 2024 10:48
Show Gist options
  • Select an option

  • Save claudiosanches/8983212 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown

Hey, thanks a lot! It works nice..

@MarianneTopping
Copy link
Copy Markdown

Works :)

@Aozuas
Copy link
Copy Markdown

Aozuas commented Feb 18, 2014

Just what I need! Obrigado novamente, mestre!

@amatzon
Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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