Skip to content

Commit

Permalink
Merge pull request #25 from helloextend/EX-442
Browse files Browse the repository at this point in the history
[EX-442] [M1] Update SDK Config for Magento Admin Offers Only to Set Region to US
  • Loading branch information
lporter-extend authored Mar 1, 2023
2 parents 2baad6f + e376842 commit 249cdbf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/code/local/Extend/Warranty/Helper/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,19 @@ public function getJsonConfig()
'environment' => $this->isLiveMode() ? self::LIVE : self::DEMO,
];

if($this->isAdmin()){
$data['region'] = 'US';
}

return json_encode($data);
}

/**
* @return boolean
*/
protected function isAdmin(){
return Mage::getSingleton('admin/session')->isLoggedIn();
}
/**
* @param $sku
* @param false $fromAdmin
Expand Down

0 comments on commit 249cdbf

Please sign in to comment.