/** * @param \Magento\Customer\Api\Data\CustomerInterface $customer * @param string $redirectUrl * * @return $this */ public function sendEmailConfirmation(\Magento\Customer\Api\Data\CustomerInterface $customer, $redirectUrl) { $storeId = $this->getWebsiteStoreId($customer); if ($this->scopeConfig->isSetFlag(\Dotdigitalgroup\Email\Helper\Config::XML_PATH_CONNECTOR_DISABLE_CUSTOMER_SUCCESS, 'store', $storeId)) { return $this; } else { parent::sendEmailConfirmation($customer, $redirectUrl); } }