add proper message when adding invalid package to cart
This commit is contained in:
@@ -137,6 +137,7 @@ class Wiaas_Cart {
|
|||||||
|
|
||||||
//Check if package is available for adding to cart
|
//Check if package is available for adding to cart
|
||||||
if (Wiaas_Package_Status::get_package_status($package_id) !== Wiaas_Package_Status::AVAILABLE){
|
if (Wiaas_Package_Status::get_package_status($package_id) !== Wiaas_Package_Status::AVAILABLE){
|
||||||
|
wc_add_notice('Package cannot be purchased at the moment', 'error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user