wc_get_rounding_precision()
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.
No Hooks.
Return
Int
.
Usage
wc_get_rounding_precision();
Changelog
Since 2.6.3 | Introduced. |
wc_get_rounding_precision() wc get rounding precision code WC 7.3.0
function wc_get_rounding_precision() { $precision = wc_get_price_decimals() + 2; if ( absint( WC_ROUNDING_PRECISION ) > $precision ) { $precision = absint( WC_ROUNDING_PRECISION ); } return $precision; }