public function aroundSave(\Magento\Config\Model\Config $config, \Closure $proceed) { $ret = $proceed(); $sectionId = $config->getSection(); if ($sectionId == 'mandrill' && !$config->getConfigDataValue('mandrill/general/active')) { $modules = $this->_loader->load(); if (isset($modules['Ebizmarts_AbandonedCart'])) { $this->_writer->save(\Ebizmarts\AbandonedCart\Model\Config::ACTIVE, 0, $config->getScope(), $config->getScopeId()); } if (isset($modules['Ebizmarts_AutoResponder'])) { $this->_writer->save(\Ebizmarts\AutoResponder\Model\Config::ACTIVE, 0, $config->getScope(), $config->getScopeId()); } } return $ret; }