diff --git a/CHANGELOG.md b/CHANGELOG.md index d29374f1..c17871ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### 1.3.5 (2018-03-05) + +* Fix issue where sometimes the connection credentials fail when assigned at website level [#112](https://github.com/classyllama/ClassyLlama_AvaTax/issues/112) + ### 1.3.4 (2018-02-14) * Fix problem where customer can't save edited address in address book [#110](https://github.com/classyllama/ClassyLlama_AvaTax/issues/110) diff --git a/Framework/AppInterface.php b/Framework/AppInterface.php index 4d78ccdd..37ca3557 100644 --- a/Framework/AppInterface.php +++ b/Framework/AppInterface.php @@ -20,5 +20,5 @@ interface AppInterface /** * If this is updated it must also be updated in composer.json */ - const APP_VERSION = '1.3.4'; + const APP_VERSION = '1.3.5'; } diff --git a/Helper/Config.php b/Helper/Config.php index 4553918d..48d870ba 100644 --- a/Helper/Config.php +++ b/Helper/Config.php @@ -591,13 +591,14 @@ public function getDevelopmentLicenseKey($store, $scopeType = ScopeInterface::SC * Get development company code from config * * @param $store + * @param $scopeType * @return string */ - public function getDevelopmentCompanyCode($store) + public function getDevelopmentCompanyCode($store, $scopeType = ScopeInterface::SCOPE_STORE) { return (string)$this->scopeConfig->getValue( self::XML_PATH_AVATAX_DEVELOPMENT_COMPANY_CODE, - ScopeInterface::SCOPE_STORE, + $scopeType, $store ); } diff --git a/Observer/ConfigSaveObserver.php b/Observer/ConfigSaveObserver.php index f3aa4678..10323f12 100644 --- a/Observer/ConfigSaveObserver.php +++ b/Observer/ConfigSaveObserver.php @@ -188,7 +188,7 @@ protected function checkCredentialsForMode($scopeId, $scopeType, $mode) if ( $this->config->getAccountNumber($scopeId, $scopeType) != '' && $this->config->getLicenseKey($scopeId, $scopeType) != '' - && $this->config->getCompanyCode($scopeId) != '' + && $this->config->getCompanyCode($scopeId, $scopeType) != '' ) { return true; } @@ -196,7 +196,7 @@ protected function checkCredentialsForMode($scopeId, $scopeType, $mode) if ( $this->config->getDevelopmentAccountNumber($scopeId, $scopeType) != '' && $this->config->getDevelopmentLicenseKey($scopeId, $scopeType) != '' - && $this->config->getDevelopmentCompanyCode($scopeId) != '' + && $this->config->getDevelopmentCompanyCode($scopeId, $scopeType) != '' ) { return true; } diff --git a/composer.json b/composer.json index 1919bcd3..e535f38b 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "classyllama/module-avatax", "type": "magento2-module", - "version": "1.3.4", + "version": "1.3.5", "license": "OSL-3.0", "require": { "magento/framework": "^100.1.0|101.0.*",