WordPress at a glance
function is not described

wc_trim_zeros() WC 1.0

Trim trailing zeros off prices.

No Hooks.

Return

String. Nothing.

Usage

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

Code of wc_trim_zeros() WC 5.3.0

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