From 968da5bfefe20ecbed600258863acdd4d4e0de18 Mon Sep 17 00:00:00 2001 From: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> Date: Thu, 29 Feb 2024 19:02:11 +0000 Subject: [PATCH] Simplify isset check for location_lat and location_lng in getAddress method. Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> --- src/Models/Location.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Models/Location.php b/src/Models/Location.php index 2bcdc0f..3f919d7 100644 --- a/src/Models/Location.php +++ b/src/Models/Location.php @@ -132,8 +132,7 @@ public static function onboardingIsComplete() return false; } - return isset($model->getAddress()['location_lat']) - && isset($model->getAddress()['location_lng']) + return isset($model->getAddress()['location_lat'], $model->getAddress()['location_lng']) && $model->delivery_areas()->whereIsDefault()->count() > 0; }