$249, not $249.00
Please provide Custom CSS to remove zero’s.
This topic has 8 replies, 3 voices, and was last updated 9 years, 3 months ago ago by Eva Kemp
$249, not $249.00
Please provide Custom CSS to remove zero’s.
Hello,
Check Woocommerce settings https://docs.woothemes.com/document/shop-currency/ and remove your number in Number of Decimals field.
You can’t remove zeros via css.
Regards,
Eva Kemp.
If I change the number of decimals to “0” in WooCommerce settings, the price of $9.99 changes to $10.
For example, I would like to price range to display as “$9.99-$249”, not “$9.99-$249.00”, and not “$10-$249”
I only want to remove “.00”
Is there any way to accomplish this?
Hello,
Please provide us with FTP and WP Dashboard credentials in Private Content.
Best regards,
Jack Richardson.
Okay, I have provided Private Content.
Hello,
I’ve added this code in theme functions.php file:
// Hide trailing zeros on prices.
add_filter( 'woocommerce_price_trim_zeros', 'wc_hide_trailing_zeros', 10, 1 );
function wc_hide_trailing_zeros( $trim ) {
// set to false to show trailing zeros
return true;
}
Please check prices now.
Regards,
Eva Kemp.
Excellent! Thank you! =)
Hello,
You’re welcome.
We’d be thankful if you leave a comment on ThemeForest site http://themeforest.net/item/woopress-responsive-ecommerce-wordpress-theme/9751050/comments .
Thank you.
Regards,
Eva Kemp.
The issue related to '‘How To: Remove Trailing Zeros for Prices Ending in ".00"’' has been successfully resolved, and the topic is now closed for further responses