WordPress at Your Fingertips
function is not described

wc_trim_zeros() WC 1.0

Trim trailing zeros off prices.

No Hooks.

Return

String.

Usage

wc_trim_zeros( $price );
$price(string|float|int) (required)
Price.

Code of wc_trim_zeros() WC 6.1.0

function wc_trim_zeros( $price ) {
	return preg_replace( '/' . preg_quote( wc_get_price_decimal_separator(), '/' ) . '0++$/', '', $price );
}