Skip to content
This repository has been archived by the owner on Apr 22, 2019. It is now read-only.

Commit

Permalink
Merge branch 'release/1.4.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Sisco committed Sep 14, 2018
2 parents e1528cc + af41353 commit 93b475e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
### 1.4.5 (2018-09-14)

* Fix issue where saving AvaTax credentials at the website scope can result in an error [#171](https://github.com/classyllama/ClassyLlama_AvaTax/issues/171)

### 1.4.4 (2018-09-13)

* Fix issue where invalid/partial zip code values result in errors logged [#122](https://github.com/classyllama/ClassyLlama_AvaTax/issues/122)
Expand Down
2 changes: 1 addition & 1 deletion Framework/AppInterface.php
Expand Up @@ -20,5 +20,5 @@ interface AppInterface
/**
* If this is updated it must also be updated in composer.json
*/
const APP_VERSION = '1.4.4';
const APP_VERSION = '1.4.5';
}
3 changes: 2 additions & 1 deletion Framework/Interaction/Tax.php
Expand Up @@ -306,7 +306,8 @@ public function getTaxService(
$scopeType = \Magento\Store\Model\ScopeInterface::SCOPE_STORE
) {
if (is_null($type)) {
$type = $this->config->getLiveMode($storeId) ? Config::API_PROFILE_NAME_PROD : Config::API_PROFILE_NAME_DEV;
$type = $this->config->getLiveMode($storeId, $scopeType)
? Config::API_PROFILE_NAME_PROD : Config::API_PROFILE_NAME_DEV;
}
if (!isset($this->taxServiceSoap[$type])) {
$this->config->createAvaTaxProfile($storeId, $scopeType);
Expand Down
6 changes: 3 additions & 3 deletions Helper/Config.php
Expand Up @@ -271,7 +271,7 @@ public function __construct(
*/
public function createAvaTaxProfile($storeId, $scopeType = ScopeInterface::SCOPE_STORE)
{
if ($this->getLiveMode($storeId)) {
if ($this->getLiveMode($storeId, $scopeType)) {
$this->avaTaxConfigFactory->create(
[
'name' => self::API_PROFILE_NAME_PROD,
Expand Down Expand Up @@ -546,11 +546,11 @@ public function getLicenseKey($store, $scopeType = ScopeInterface::SCOPE_STORE)
* @param $store
* @return string
*/
public function getCompanyCode($store)
public function getCompanyCode($store, $scopeType = ScopeInterface::SCOPE_STORE)
{
return (string)$this->scopeConfig->getValue(
self::XML_PATH_AVATAX_PRODUCTION_COMPANY_CODE,
ScopeInterface::SCOPE_STORE,
$scopeType,
$store
);
}
Expand Down
5 changes: 3 additions & 2 deletions Observer/ConfigSaveObserver.php
Expand Up @@ -144,7 +144,8 @@ protected function sendPing($scopeId, $scopeType)
}

$message = '';
$type = $this->config->getLiveMode($scopeId, $scopeType) ? Config::API_PROFILE_NAME_PROD : Config::API_PROFILE_NAME_DEV;
$type = $this->config->getLiveMode($scopeId, $scopeType)
? Config::API_PROFILE_NAME_PROD : Config::API_PROFILE_NAME_DEV;
if ($this->checkCredentialsForMode($scopeId, $scopeType, $type)) {
try {
$result = $this->interactionTax->getTaxService($type, $scopeId, $scopeType)->ping();
Expand All @@ -155,7 +156,7 @@ protected function sendPing($scopeId, $scopeType)
} elseif (is_object($result) && $result->getResultCode() == \AvaTax\SeverityLevel::$Success) {
$this->messageManager->addSuccess(
__('Successfully connected to AvaTax using the '
. '<a href="#row_tax_avatax_connection_settings_header">%1 credentials</a>', $type
. '<a href="#row_tax_avatax_connection_settings_header">%1 credentials</a>.', $type
)
);
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
@@ -1,7 +1,7 @@
{
"name": "classyllama/module-avatax",
"type": "magento2-module",
"version": "1.4.4",
"version": "1.4.5",
"license": "OSL-3.0",
"require": {
"magento/framework": "^100.1.0|101.0.*",
Expand Down

0 comments on commit 93b475e

Please sign in to comment.