From f514c231ceb36e939001dde05e3d8408209e235e Mon Sep 17 00:00:00 2001 From: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> Date: Sun, 27 Oct 2024 13:09:19 +0000 Subject: [PATCH] Merge master into v4 Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> --- src/Classes/OrderManager.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Classes/OrderManager.php b/src/Classes/OrderManager.php index 64a1ce9..5feb31f 100644 --- a/src/Classes/OrderManager.php +++ b/src/Classes/OrderManager.php @@ -150,15 +150,10 @@ public function validateDeliveryAddress(array $address) $address['country'] = app('country')->getCountryNameById($address['country_id']); } - $addressString = implode(' ', array_only($address, [ + $collection = app('geocoder')->geocode(implode(' ', array_only($address, [ 'address_1', 'address_2', 'city', 'state', 'postcode', 'country', - ])); + ]))); - if (!$this->location->requiresUserPosition()) { - return; - } - - $collection = app('geocoder')->geocode($addressString); if (!$collection || $collection->isEmpty()) { throw new ApplicationException(lang('igniter.local::default.alert_invalid_search_query')); }