WPITECH
Image default
WooCommerce

How to Show Trailing Zeros on Prices in WooCommerce

If you are looking to add trailing zeros to your WooCommerce prices then there is a plugin for this, but I have created a simple code snippet that shows trailing zeros on prices in WooCommerce.

All you have to do is just to add this code in your theme’s functions.php file.

add_filter( 'woocommerce_price_try_zeros', 'wc_hide_trailing_zero', 10, 1 );
function wc_hide_trailing_zero( $try ) {
// set to false to show trailing zero
return false;
}

 

Related posts

How to Setup WooCommerce Deposits for Store Product

WPITECH

Shortcodes of WooCommerce

WPITECH

How To Hide or Disable Add To Cart Button In WooCommerce Store

WPITECH