Hide ".00" on Whole-Number Prices
Shows round prices as 25 instead of 25.00 while keeping decimals on prices that need them, such as 24.99.
Opens WPIDE on
Code
add_filter( 'woocommerce_price_trim_zeros', '__return_true' );
Notes
Affects every price WooCommerce formats, including the cart and emails.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.