diff --git a/lib/Citycom/OanApiHelper.php b/lib/Citycom/OanApiHelper.php index 87404fe7d..ee793e0e8 100644 --- a/lib/Citycom/OanApiHelper.php +++ b/lib/Citycom/OanApiHelper.php @@ -116,10 +116,12 @@ class Citycom_OanApiHelper { $this->log->debug(print_r($want_services, true)); + $allowed_service_types = array_merge(CITYCOM_OAN_API_SERVICES_FOR_ORDER, CITYCOM_OAN_API_SERVICES_FOR_RESERVATION); + // check if we have these services already foreach($cc_service_types as $stype) { - if(!in_array($stype->name, CITYCOM_OAN_API_SERVICES_FOR_ORDER)) continue; - $ctag_service_type = array_flip(CITYCOM_OAN_API_SERVICES_FOR_ORDER)[$stype->name]; + if(!in_array($stype->name, $allowed_service_types)) continue; + $ctag_service_type = array_flip($allowed_service_types)[$stype->name]; if(PreorderCtag::getFirstActive(["preorder_id" => $preorder->id, "service_type" => $ctag_service_type])) { // service was ordered already, remove from want_services unset($want_services[$ctag_service_type]);