Get rounding precision for internal WC calculations.

Description Description

Will increase the precision of wc_get_price_decimals by 2 decimals, unless WC_ROUNDING_PRECISION is set to a higher number.

Return Return


Top ↑

Source Source

File: includes/wc-core-functions.php

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

Top ↑

Changelog Changelog

Version Description
2.6.3 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.