From 7b8156083b54971d63226ef96244e948df05313e Mon Sep 17 00:00:00 2001 From: gonzalo Date: Thu, 14 Sep 2023 10:05:19 -0300 Subject: [PATCH 1/3] closes #1834 for magento 2.3.6-p1 --- Ui/Component/Batch/Grid/Column/Batches.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Ui/Component/Batch/Grid/Column/Batches.php b/Ui/Component/Batch/Grid/Column/Batches.php index c56b1ab1..e6906e88 100644 --- a/Ui/Component/Batch/Grid/Column/Batches.php +++ b/Ui/Component/Batch/Grid/Column/Batches.php @@ -96,9 +96,13 @@ public function prepareDataSource(array $dataSource) private function getMCStoreNameById($mailchimp_store_id, $magentoStoreId) { if (!key_exists($mailchimp_store_id, $this->stores)) { - $api = $this->_helper->getApi($magentoStoreId); - $store = $api->ecommerce->stores->get($mailchimp_store_id); - $this->stores[$mailchimp_store_id] = $store['name']; + $api = $this->helper->getApi($magentoStoreId); + try { + $store = $api->ecommerce->stores->get($mailchimp_store_id); + $this->stores[$mailchimp_store_id] = $store['name']; + } catch (\Exception) { + $this->stores[$mailchimp_store_id] = 'Not existing store'; + } } return $this->stores[$mailchimp_store_id]; } From 262b4b87f6ecc4e0a2774b64797f91de0cfc57cc Mon Sep 17 00:00:00 2001 From: gonzalo Date: Thu, 14 Sep 2023 10:08:31 -0300 Subject: [PATCH 2/3] closes #1834 for magento 2.3.6-p1 --- Ui/Component/Batch/Grid/Column/Batches.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ui/Component/Batch/Grid/Column/Batches.php b/Ui/Component/Batch/Grid/Column/Batches.php index e6906e88..23d9b7b8 100644 --- a/Ui/Component/Batch/Grid/Column/Batches.php +++ b/Ui/Component/Batch/Grid/Column/Batches.php @@ -100,7 +100,7 @@ private function getMCStoreNameById($mailchimp_store_id, $magentoStoreId) try { $store = $api->ecommerce->stores->get($mailchimp_store_id); $this->stores[$mailchimp_store_id] = $store['name']; - } catch (\Exception) { + } catch (\Exception $e) { $this->stores[$mailchimp_store_id] = 'Not existing store'; } } From 459f55146d53693c192f848a913a760fc701f1d6 Mon Sep 17 00:00:00 2001 From: gonzalo Date: Thu, 14 Sep 2023 10:24:31 -0300 Subject: [PATCH 3/3] closes #1834 for magento 2.3.6-p1 --- Ui/Component/Batch/Grid/Column/Batches.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Ui/Component/Batch/Grid/Column/Batches.php b/Ui/Component/Batch/Grid/Column/Batches.php index 23d9b7b8..01fd2b9b 100644 --- a/Ui/Component/Batch/Grid/Column/Batches.php +++ b/Ui/Component/Batch/Grid/Column/Batches.php @@ -26,11 +26,11 @@ class Batches extends Column */ protected $urlBuilder; /** - * @var Helper + * @var \Ebizmarts\MailChimp\Model\MailChimpSyncBatches */ protected $mailChimpSyncB; /** - * @var Helper + * @var \Ebizmarts\MailChimp\Helper\Data */ protected $helper; @@ -53,7 +53,7 @@ public function __construct( array $components = [], array $data = [] ) { - $this->_helper = $helper; + $this->helper = $helper; $this->mailChimpSyncB = $mailChimpSyncB; $this->urlBuilder = $urlBuilder; parent::__construct($context, $uiComponentFactory, $components, $data);