prevent adding invalid package to cart
This commit is contained in:
@@ -135,6 +135,11 @@ class Wiaas_Cart {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Check if package is available for adding to cart
|
||||||
|
if (Wiaas_Package_Status::get_package_status($package_id) !== Wiaas_Package_Status::AVAILABLE){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Retrieve package country
|
// Retrieve package country
|
||||||
$country = Wiaas_Countries::get_package_country($package);
|
$country = Wiaas_Countries::get_package_country($package);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user