add more validation

This commit is contained in:
Bilal Catic
2018-11-01 00:28:33 +01:00
parent 46e2259359
commit 1a33593cbe
2 changed files with 5 additions and 1 deletions

View File

@@ -248,6 +248,10 @@ class Wiaas_Cart {
* @return bool
*/
public static function update_package_quantity($package_cart_item_key, $new_quantity) {
if ($new_quantity > 65000){
return false;
}
$cart_item = WC()->cart->get_cart_item($package_cart_item_key);
if (!$cart_item) {