From f61d55b08b6167ac76d52959aa57b2b86e201297 Mon Sep 17 00:00:00 2001 From: Nirav Patel Date: Tue, 4 Apr 2023 12:53:23 +0000 Subject: [PATCH 1/2] release/2.5.1 --- Framework/AppInterface.php | 2 +- .../ExtensionAttributesPersistencePlugin.php | 10 ++++++++-- composer.json | 2 +- docs/getting-started.md | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Framework/AppInterface.php b/Framework/AppInterface.php index 6c518da9..5a3b81f0 100644 --- a/Framework/AppInterface.php +++ b/Framework/AppInterface.php @@ -20,7 +20,7 @@ interface AppInterface /** * Connector version */ - const APP_VERSION = '2.5.0'; + const APP_VERSION = '2.5.1'; /** * Avalara APP String */ diff --git a/Plugin/Model/ResourceModel/ExtensionAttributesPersistencePlugin.php b/Plugin/Model/ResourceModel/ExtensionAttributesPersistencePlugin.php index 41b48222..37c29dea 100644 --- a/Plugin/Model/ResourceModel/ExtensionAttributesPersistencePlugin.php +++ b/Plugin/Model/ResourceModel/ExtensionAttributesPersistencePlugin.php @@ -140,7 +140,7 @@ public function aroundSave(AbstractDb $subject, callable $proceed, AbstractModel $attributeCode ); } - + $tablesToUpdate[$directive['join_reference_table']] = $directive; $dataToSave = [$directive['join_reference_field'] => $object->getId()]; $fields = []; @@ -264,12 +264,18 @@ public function aroundLoad(AbstractDb $subject, callable $proceed, AbstractModel foreach (array_unique(array_keys($tablesToUpdate)) as $tableName) { + \Magento\Framework\App\ObjectManager::getInstance() + ->get('Psr\Log\LoggerInterface')->debug("field:". $tablesToUpdate[$tableName]['join_reference_field']. " value:".$tablesToUpdate[$tableName]['join_reference_field_value']); + $fields = array_merge(...$tableFields[$tableName]); $select = $subject->getConnection()->select()->from($subject->getTable($tableName))->columns($fields)->where( - $tablesToUpdate[$tableName]['join_reference_field'], + $tablesToUpdate[$tableName]['join_reference_field']. " = ?", $tablesToUpdate[$tableName]['join_reference_field_value'] ); + \Magento\Framework\App\ObjectManager::getInstance() + ->get('Psr\Log\LoggerInterface')->debug($select); + $data = $subject->getConnection()->fetchRow($select); if ($data) { foreach ($tablesToUpdate[$tableName]['attribute_codes'] as $attributeCode => $fields) { diff --git a/composer.json b/composer.json index 46cfedf8..ee479e80 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "avalara/avatax-magento", "type": "magento2-module", - "version": "2.5.0", + "version": "2.5.1", "license": "OSL-3.0", "description": "Magento module for Avalara's AvaTax suite of business tax calculation and processing services. Uses the AvaTax REST v2 API.", "require": { diff --git a/docs/getting-started.md b/docs/getting-started.md index b386b28e..990b5802 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -57,7 +57,7 @@ This is the recommended installation method as it allows you to easily update th 1. Require the desired version of AvaTax. Latest version can be installed by running following command: ``` - composer require avalara/avatax-magento:2.5.0 + composer require avalara/avatax-magento:2.4.2 ``` 2. Setup the AvaTax module in magento From 89d36219cc9218161d7dbbca846b4b5fe350b1c9 Mon Sep 17 00:00:00 2001 From: Asheesh Kumar Singh Date: Tue, 4 Apr 2023 18:28:10 +0530 Subject: [PATCH 2/2] Update getting-started.md --- docs/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 990b5802..3219fa65 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -57,7 +57,7 @@ This is the recommended installation method as it allows you to easily update th 1. Require the desired version of AvaTax. Latest version can be installed by running following command: ``` - composer require avalara/avatax-magento:2.4.2 + composer require avalara/avatax-magento:2.5.1 ``` 2. Setup the AvaTax module in magento