Merge pull request woocommerce/woocommerce-admin#461 from woocommerce/fix/453

Casted numeric values to floats before performing arithmetic operations.
This commit is contained in:
Claudio Sanches 2018-09-27 12:29:29 -03:00 committed by GitHub
commit d672a65e1f
1 changed files with 1 additions and 1 deletions

View File

@ -419,7 +419,7 @@ class WC_Admin_Reports_Orders_Data_Store extends WC_Admin_Reports_Data_Store imp
'refund_total' => $order->get_total_refunded(),
'tax_total' => $order->get_total_tax(),
'shipping_total' => $order->get_shipping_total(),
'net_total' => $order->get_total() - $order->get_total_tax() - $order->get_shipping_total(),
'net_total' => (float) $order->get_total() - (float) $order->get_total_tax() - (float) $order->get_shipping_total(),
);
// Update or add the information to the DB.