WC_Cart_Totals::round_merged_taxes()protectedWC 3.5.4

Deprecated from version 3.9.0 `calculate_item_subtotals` should already appropriately round the tax values.. It is no longer supported and can 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.




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


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 8.9.0

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

	return $taxes;