_scopeConfig = $scopeConfig; } public function aroundNewAccount( \Magento\Customer\Model\EmailNotification $subject, \Closure $proceed, $customer, $type = \Magento\Customer\Model\EmailNotification::NEW_ACCOUNT_EMAIL_REGISTERED, $backUrl = '', $storeId = null, $sendemailStoreId = null ) { $disabled = $customer->getCustomAttribute('netsuite_id'); if ($disabled) { return; } $result = $proceed($customer, $type, $backUrl, $storeId, $sendemailStoreId); return $result; } }