Article Category

Disable decimals in money response

Code snippet is included.

This is a Developer level doc. We are unable to provide support for customizations under ourĀ  Support Policy. See guide on adding PHP code without editing files.

API Version: 2

If you have decimals set under the “General” settings of your WooCommerce store and you have certain products that cause trailing zeros.

This filter will disable the decimals.

add_filter( 'cocart_prepare_money_disable_decimals', '__return_true' );

Was this helpful to you?