From 83c644d45b8bd8f20968d53a2d4e69e516796be8 Mon Sep 17 00:00:00 2001 From: kaioken Date: Mon, 23 Dec 2024 21:04:24 -0400 Subject: [PATCH] fix: cron --- .../Connectors/ESim/SyncOrdersWithProviderCommand.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Console/Commands/Connectors/ESim/SyncOrdersWithProviderCommand.php b/app/Console/Commands/Connectors/ESim/SyncOrdersWithProviderCommand.php index 70b9d0aa4..266a9755d 100644 --- a/app/Console/Commands/Connectors/ESim/SyncOrdersWithProviderCommand.php +++ b/app/Console/Commands/Connectors/ESim/SyncOrdersWithProviderCommand.php @@ -65,6 +65,12 @@ public function handle() $item = $order->items()->first(); $provider = $item->variant->product->getAttributeBySlug(ConfigurationEnum::PROVIDER_SLUG->value); + if ($provider == null) { + $this->info("Order ID: {$order->id} does not have a provider."); + + continue; + } + match (strtolower($provider->value)) { strtolower(ProviderEnum::E_SIM_GO->value) => $this->esimGoFulfillment($eSimService, $order, $iccid, $bundle), strtolower(ProviderEnum::EASY_ACTIVATION->value) => [],