Merge pull request #13765 from woocommerce/fix-13752

Cast values to float
This commit is contained in:
Claudio Sanches 2017-03-24 11:18:03 -03:00 committed by GitHub
commit eb0f9656c2
1 changed files with 1 additions and 1 deletions

View File

@ -412,7 +412,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
$tax_totals[ $code ]->rate_id = $tax->get_rate_id();
$tax_totals[ $code ]->is_compound = $tax->is_compound();
$tax_totals[ $code ]->label = $tax->get_label();
$tax_totals[ $code ]->amount += $tax->get_tax_total() + $tax->get_shipping_tax_total();
$tax_totals[ $code ]->amount += (float) $tax->get_tax_total() + (float) $tax->get_shipping_tax_total();
$tax_totals[ $code ]->formatted_amount = wc_price( wc_round_tax_total( $tax_totals[ $code ]->amount ), array( 'currency' => $this->get_currency() ) );
}