WC_Cart_Totals::round_merged_taxesprotectedWC 3.5.4

Deprecated since 3.9.0 `calculate_item_subtotals` should already appropriately round the tax values.. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.

Round merged taxes.

Method of the class: WC_Cart_Totals{}

No Hooks.

Returns

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->round_merged_taxes( $taxes );
$taxes(array) (required)
Taxes to round.

Changelog

Since 3.5.4 Introduced.
Deprecated since 3.9.0 calculate_item_subtotals should already appropriately round the tax values.

WC_Cart_Totals::round_merged_taxes() code WC 10.4.3

protected function round_merged_taxes( $taxes ) {
	foreach ( $taxes as $rate_id => $tax ) {
		$taxes[ $rate_id ] = $this->round_line_tax( $tax );
	}

	return $taxes;
}