/**
* Get taxes, merged by code, formatted ready for output.
*
* @access public
* @return void
*/
public function get_tax_totals()
{
$taxes = $this->get_taxes();
$tax_totals = array();
foreach ($taxes as $key => $tax) {
$code = $this->tax->get_rate_code($key);
if (!isset($tax_totals[$code])) {
$tax_totals[$code] = new stdClass();
$tax_totals[$code]->amount = 0;
}
$tax_totals[$code]->is_compound = $this->tax->is_compound($key);
$tax_totals[$code]->label = $this->tax->get_rate_label($key);
$tax_totals[$code]->amount += $tax;
$tax_totals[$code]->formatted_amount = woocommerce_price($tax_totals[$code]->amount);
}
return apply_filters('woocommerce_cart_tax_totals', $tax_totals, $this);
}