Merge pull request #13560 from JeroenSormani/php71-typecast-fix
Type cast ->get_weight() on WC_Cart::get_cart_contents_weight calcula…
This commit is contained in:
commit
19759a83b4
|
@ -358,7 +358,7 @@ class WC_Cart {
|
|||
$weight = 0;
|
||||
|
||||
foreach ( $this->get_cart() as $cart_item_key => $values ) {
|
||||
$weight += $values['data']->get_weight() * $values['quantity'];
|
||||
$weight += (float) $values['data']->get_weight() * $values['quantity'];
|
||||
}
|
||||
|
||||
return apply_filters( 'woocommerce_cart_contents_weight', $weight );
|
||||
|
|
Loading…
Reference in New Issue