File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -112,15 +112,17 @@ public function afterLoadBySubscriberEmail(\Magento\Newsletter\Model\Subscriber
112112 */
113113 public function afterLoadByCustomer (\Magento \Newsletter \Model \Subscriber $ subscriber , $ customerId , $ websiteId )
114114 {
115- try {
116- if (!$ this ->_helper ->getConfigValue (
117- \Ebizmarts \MailChimp \Helper \Data::XML_MAGENTO_MAIL ,
118- $ subscriber ->getStoreId ()
119- )) {
120- $ subscriber ->setImportMode (true );
115+ if ($ this ->_helper ->isMailChimpEnabled ($ subscriber ->getStoreId ())) {
116+ try {
117+ if (!$ this ->_helper ->getConfigValue (
118+ \Ebizmarts \MailChimp \Helper \Data::XML_MAGENTO_MAIL ,
119+ $ subscriber ->getStoreId ()
120+ )) {
121+ $ subscriber ->setImportMode (true );
122+ }
123+ } catch (\Exception $ exception ) {
124+ $ this ->_helper ->log ($ exception ->getMessage ());
121125 }
122- } catch (\Exception $ exception ) {
123- $ this ->_helper ->log ($ exception ->getMessage ());
124126 }
125127
126128 return $ subscriber ;
You can’t perform that action at this time.
0 commit comments