From e28f8255c3f02a03248131fc2108860081f4b4f7 Mon Sep 17 00:00:00 2001 From: Peter Fabian Date: Thu, 20 Sep 2018 16:03:27 +0200 Subject: [PATCH] Casted numeric values to floats before performing arithmetic operations. --- .../data-stores/class-wc-admin-reports-orders-data-store.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/woocommerce-admin/includes/data-stores/class-wc-admin-reports-orders-data-store.php b/plugins/woocommerce-admin/includes/data-stores/class-wc-admin-reports-orders-data-store.php index 82b9e196dd2..0a83c6769f6 100644 --- a/plugins/woocommerce-admin/includes/data-stores/class-wc-admin-reports-orders-data-store.php +++ b/plugins/woocommerce-admin/includes/data-stores/class-wc-admin-reports-orders-data-store.php @@ -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.