From 0ceb8ed6ede68d6bfa8270f227f1803bf1c3a0dc Mon Sep 17 00:00:00 2001 From: gonzalo Date: Mon, 28 Aug 2023 11:06:21 -0300 Subject: [PATCH] Version 101.2.54 for magento 2.2 --- Helper/Sync.php | 9 --------- Model/Config/Backend/MonkeyStore.php | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Helper/Sync.php b/Helper/Sync.php index 4eb0160f..5074c59f 100644 --- a/Helper/Sync.php +++ b/Helper/Sync.php @@ -155,15 +155,6 @@ public function resetErrors($mailchimpStore, $storeId, $retry) $tableName, "mailchimp_store_id = '" . $mailchimpStore . "' and mailchimp_sync_error is not null" ); - // clean the order table - $orderCollection = $this->orderCollectionFactory->create(); - $orderCollection->addFieldToFilter('store_id', ['eq' => $storeId]); - $orderCollection->addFieldToFilter('mailchimp_sync_error', ['notnull' => true]); - foreach ($orderCollection as $item) { - $item->setMailchimpSent(\Ebizmarts\MailChimp\Helper\Data::NEVERSYNC); - $item->setMailchimpSyncError(''); - $item->save(); - } } } catch (\Zend_Db_Exception $e) { throw new ValidatorException(__($e->getMessage())); diff --git a/Model/Config/Backend/MonkeyStore.php b/Model/Config/Backend/MonkeyStore.php index 0a7f7826..6e317ca9 100644 --- a/Model/Config/Backend/MonkeyStore.php +++ b/Model/Config/Backend/MonkeyStore.php @@ -140,7 +140,7 @@ public function beforeSave() } if ($found==1) { $this->_helper->cancelAllPendingBatches($mailchimpStore); - $this->syncHelper->resetErrors($mailchimpStore, true); + $this->syncHelper->resetErrors($mailchimpStore, $storeId,true); } $this->_helper->restoreAllCanceledBatches($this->getValue()); if ($createWebhook) {