From 305e56672ed59bec87c78e930df7735319bcf9df Mon Sep 17 00:00:00 2001 From: jm-extend Date: Fri, 21 Nov 2025 13:31:59 -0600 Subject: [PATCH 1/2] Update Installation.php change the region value in the payload. as it's always grabbing the region from the store, and bypasses the geofencing on the API side. Having the API determine the region is the better way. --- ViewModel/Installation.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ViewModel/Installation.php b/ViewModel/Installation.php index 7866d471..f614880f 100644 --- a/ViewModel/Installation.php +++ b/ViewModel/Installation.php @@ -155,6 +155,10 @@ public function getJsonConfig($storeId = null): string } catch (InvalidArgumentException $exception) { $jsonConfig = ''; } + + if (isset($config['region'])){ + unset($config['region']); + } } return $jsonConfig; @@ -261,11 +265,17 @@ private function isAdmin() */ private function getRegion($storeId = null): string { + return null; + /* + * Removed Nov. 2025 if the payload has a region (form the store) , it overrides the customer's region. + * This bypasses the location filtering. let the API determine the region based on the customer. + return (string)$this->scopeConfig->getValue( \Magento\Config\Model\Config\Backend\Admin\Custom::XML_PATH_GENERAL_COUNTRY_DEFAULT, ScopeInterface::SCOPE_STORES, $storeId ); + */ } /** From da2a4d7b2b52a1aec2676abb114607c208b31b87 Mon Sep 17 00:00:00 2001 From: JM <100705862+jm-extend@users.noreply.github.com> Date: Fri, 21 Nov 2025 13:42:02 -0600 Subject: [PATCH 2/2] Update Installation.php fixed newly introduced bug, the returned value is a nullable string --- ViewModel/Installation.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ViewModel/Installation.php b/ViewModel/Installation.php index f614880f..b3028cc6 100644 --- a/ViewModel/Installation.php +++ b/ViewModel/Installation.php @@ -155,10 +155,6 @@ public function getJsonConfig($storeId = null): string } catch (InvalidArgumentException $exception) { $jsonConfig = ''; } - - if (isset($config['region'])){ - unset($config['region']); - } } return $jsonConfig; @@ -263,7 +259,7 @@ private function isAdmin() * * @return string */ - private function getRegion($storeId = null): string + private function getRegion($storeId = null): ?string { return null; /*