Skip to content

Commit ead84c2

Browse files
Renato Alveskidunot89
andauthored
Update includes/connection/class-cart-items.php
Co-Authored-By: Geoffrey K Taylor <[email protected]>
1 parent 8a822d1 commit ead84c2

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

includes/connection/class-cart-items.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,7 @@ public static function get_connection_config( $args = array() ): array {
5555
return 0;
5656
}
5757

58-
$count = 0;
59-
foreach ( $items as $item ) {
60-
$count += $item['quantity'];
61-
}
62-
63-
return $count;
58+
return array_sum( array_column( $items, 'quantity' ) );
6459
},
6560
),
6661
'productCount' => array(

0 commit comments

Comments
 (0)