wc_get_rounding_precision()WC 2.6.3

Get rounding precision for internal WC calculations. Will increase the precision of wc_get_price_decimals by 2 decimals, unless WC_ROUNDING_PRECISION is set to a higher number.

Хуков нет.

Возвращает

int.

Использование

wc_get_rounding_precision();

Список изменений

С версии 2.6.3 Введена.

Код wc_get_rounding_precision() WC 6.9.4

function wc_get_rounding_precision() {
	$precision = wc_get_price_decimals() + 2;
	if ( absint( WC_ROUNDING_PRECISION ) > $precision ) {
		$precision = absint( WC_ROUNDING_PRECISION );
	}
	return $precision;
}