Skip to content

Commit

Permalink
Update CartManager.php
Browse files Browse the repository at this point in the history
  • Loading branch information
bobimicroweber committed May 9, 2022
1 parent a5c4fc8 commit 6b7bcb9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/MicroweberPackages/Cart/CartManager.php
Expand Up @@ -409,6 +409,12 @@ public function update_item_qty($data)
if (!isset($data['qty'])) {
return array('error' => _e('Invalid data', true));
}

$data['qty'] = intval($data['qty']);
if ($data['qty'] < 1) {
return array('error' => _e('Invalid product quantity', true));
}

$data_fields = false;

$cart = array();
Expand Down

0 comments on commit 6b7bcb9

Please sign in to comment.