From e5683a1e3eba108ff2643594adeeb2f77ace72cf Mon Sep 17 00:00:00 2001 From: Stas Demin Date: Mon, 17 Jun 2024 15:29:48 +0300 Subject: [PATCH] fix: remove not necessary variables --- src/Helpers/DeliveryCalc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Helpers/DeliveryCalc.php b/src/Helpers/DeliveryCalc.php index a556a31..d8aec52 100644 --- a/src/Helpers/DeliveryCalc.php +++ b/src/Helpers/DeliveryCalc.php @@ -181,8 +181,9 @@ static function ($carry, $item) use ($package) { $deliveryParam['type'] = Tariff::getTariffType($deliveryParam['tariff_code']); $serviceList = Helper::getServices($deliveryMethod, $deliveryParam['tariff_code']); + if (!empty($serviceList)) { - $deliveryParam['services'] = $serviceList; + $deliveryParam['services'] = array_merge($serviceList, $deliveryParam['services']); } $tariffInfo = $api->calculateTariff($deliveryParam);