WordPress at Your Fingertips
function is not described

WC_Cart_Totals::round_merged_taxes() protected WC 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.

{} It's a 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.

Code of WC_Cart_Totals::round_merged_taxes() WC 5.9.0

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

	return $taxes;