add detailed error message

This commit is contained in:
Bilal Catic
2018-10-11 03:13:15 +02:00
parent 4f31cc94e8
commit 84ba574bcb

View File

@@ -24,7 +24,7 @@ class Wiaas_Checkout {
$item_id = $item['data']->get_id();
if (wc_pb_is_bundle_container_cart_item($item) &&
(Wiaas_Package_Status::get_package_status($item_id) !== Wiaas_Package_Status::AVAILABLE)){
return false;
throw new Exception('Package ' . $item['data']->get_title() . ' cannot be purchased at the moment');
}
}