Want to know what WordPress Theme a site is using? Check Out Now!

How to Remove Zero Decimals from WooCommerce Product Price?

Do you want to remove zero decimals from WooCommerce product price?

WooCommerce comes with a setting to choose the number of digits appearing after the decimal. But what if you want to remove the digits appearing after the decimal completely?

Well, you can remove the digits after the decimal from the product price in WooCommerce using the below code.

/**
 * Remove Zero Decimals from Product Price in WooCommerce
 */
add_filter( ‘woocommerce_price_trim_zeros’, ‘__return_true’ );

Leave a Reply

Your email address will not be published. Required fields are marked *