How to disable cutomer mail verification in magento
To disable customer email verification in Magento, you can follow these steps:
Method 1: Disable email verification through Magento configuration
- Log in to your Magento admin panel.
- Go to Stores > Configuration > Customers > Options.
- Scroll down to the Customer Options section.
- Find the Email Verification option and set it to No.
- Save the configuration.
Method 2: Disable email verification through Magento code
- Log in to your Magento admin panel.
- Go to System > Advanced > Developer > Disable.
- In the Disable section, click on Add.
- In the Disable field, enter the following code:
Mage_Customer_Model_Customer::verifyEmail
- Click Save.
Method 3: Disable email verification using a custom module
- Create a new module in your Magento installation (e.g.,
MyCompany_CustomerEmailVerification
). - In the
etc/modules
directory of your module, create a new file calledMyCompany_CustomerEmailVerification.xml
with the following content:<?xml version="1.0"?> <config> <modules> <MyCompany_CustomerEmailVerification> <active>true</active> <codePool>local</codePool> </MyCompany_CustomerEmailVerification> </modules> </config>
- In the
Model
directory of your module, create a new file calledCustomer.php
with the following content:<?php
class MyCompany_CustomerEmailVerification_Model_Customer extends Mage_Customer_Model_Customer { public function verifyEmail($email) { // Disable email verification return true; } }
4. In the `etc/config.xml` file of your module, add the following code:
```xml
<?xml version="1.0"?>
<config>
<global>
<models>
<customer>
<class>MyCompany_CustomerEmailVerification_Model_Customer</class>
</customer>
</models>
</global>
</config>
- Save the changes and refresh the Magento cache.
After disabling email verification, customers will no longer receive an email verification link when creating a new account or updating their email address.