wc_round_discount()WC 1.0

Round discount.

No Hooks.

Return

float.

Usage

wc_round_discount( $value, $precision );
$value(double) (required)
Amount to round.
$precision(int) (required)
DP to round.

wc_round_discount() code WC 8.9.0

function wc_round_discount( $value, $precision ) {
	return NumberUtil::round( $value, $precision, WC_DISCOUNT_ROUNDING_MODE ); // phpcs:ignore PHPCompatibility.FunctionUse.NewFunctionParameters.round_modeFound
}