Cast to float, to avoid performing arithmetic with strings (https://github.com/woocommerce/woocommerce-admin/pull/4042)
This commit is contained in:
parent
ee0eec8a40
commit
801cd357a0
|
@ -31,7 +31,7 @@ trait OrderTraits {
|
|||
return 0;
|
||||
}
|
||||
|
||||
$total_shipping_amount = $this->get_shipping_total();
|
||||
$total_shipping_amount = (float) $this->get_shipping_total();
|
||||
|
||||
return $total_shipping_amount / $order_items * $product_qty;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue