How to Validate New Registrations Using Emails in WooCommerce

user email verification for woocommerce

Are you looking for a reliable way to ensure that the users registering on your WooCommerce store are genuine? Validating new registrations using smart email verification is a crucial step in maintaining the security and integrity of your online store. This process helps in filtering out spam accounts and ensures that only legitimate users gain access. In this guide, we will explore various methods to effectively validate new registrations using emails in WooCommerce.

Validate New Registrations Using Emails in WooCommerce – Methods

Validating new registrations using emails can be carried out using three methods. Each of the methods is discussed below for your understanding. 

  1. User Email Verification for WooCommerce by KoalaApps
  2. Validate Emails in WooCommerce Manually
  3. Validate New Registrations Using Emails in WooCommerce Programmatically

Method #1: User Email Verification for WooCommerce by KoalaApps

The WooCommerce User Email Verification plugin helps store owners prevent spam registrations, fake orders, and bouncing emails by requiring smart email verification for new and existing customers. This plugin sends a verification email, which users must respond to before their accounts are activated. Store owners can easily manage and delete unverified customers. Additionally, the plugin allows customization of verification emails, excludes certain user roles from verification, and provides options to redirect users after verification, block automatic logins, and restrict checkout for unverified users.

Installation

To install the User Email Verification plugin by KoalaApps, follow these steps:

  • To install this plugin, search the .zip file from your WooCommerce account and begin downloading.
  • Go to the WordPress Admin Panel. Select Plugins and choose Add New and then choose the file to Upload Plugin.
  • Select Install Now and then click Activate.

Setup and Configuration

After installation and activation, the Smart Email Verification settings can be accessed through WordPress Admin > WooCommerce > Settings > Email Verification. Here, you can manage the plugin’s functionality through the General and Message Settings.

Verification Notice for New Account Registration Emails

When customers register a new account, it is essential to verify their email addresses to ensure the validity and security of the account. This section covers how to display and customize verification notices for new registrations in WooCommerce.

After submitting the registration form, customers will see a verification notice. You can customize these notices. Navigate to the General Settings to customize the following options:

Send Separate Verification Email: 

  • By default, the verification link is added to WooCommerce’s “New Account” email. You can send a separate verification email and delay the “New Account” email until the user has verified their account.

Customization Options: 

  • Customize the verification link and message to be appended to the “New Account” email. 
  • Set specific user roles (e.g., shop manager, VIP customers) to bypass the verification process.

Verification for Existing Users:

  • Enable email verification for existing users, prompting them to verify their email upon their next login.

Post-Verification Redirection:

  • Redirect users to the “My Account” page, the home page, or any custom URL after successful email verification.

Login Restrictions:

  • Prevent automatic login after registration until the email is verified. You can redirect users to a custom URL during this process.
  • Disable automatic login after checkout to enforce email verification.

Order Confirmation Restrictions:

  • Display a notice on the order confirmation “Thank You” page or block access to this page for users with unverified email addresses.
  • Block default order confirmation emails or prevent checkout entirely for unverified users.

Logout Unverified Users:

  • Automatically log out users with unverified email addresses, prompting them to verify before accessing their accounts again.

Verification Link Expiry:

  • Set an expiration time for the verification link and customize the message shown when the link has expired.

Email Blacklisting:

  • Blacklist specific email addresses and customize the notice shown to those attempting to register with these addresses.

Personalize Notices in the Email Verification Process

In the Message settings, you can personalize various notices that are shown to users during different stages of the email verification process. 

  • Successful Account Creation Message: Displayed on the account login page when a user’s email verification is successful.
  • Email Verification Reminder: Shown to unverified users attempting to log in, prompting them to verify their email.
  • Failed Verification Notice: Appears when the email verification process is unsuccessful.
  • New User Activation Notice: Displayed when a new user registers, guiding them through the next steps for verification.
  • Resend Verification Email Message: Shown when a verification email is successfully resent to the user.
email verification for woocommerce

Method #2: Manually Verify a User

To manually verify a user’s email address in WooCommerce, follow these steps:

  • Navigate to WooCommerce > Users > All Users.
  • Select the relevant user and click on Edit.
  • In the “User status” field, choose the appropriate verification status from the dropdown menu.
  • Click Update Profile to save the changes.

Method #3: Validate New Registrations Using Emails in WooCommerce Programmatically

Find the code below for programmatic email validation in your store. 

public function verifyAccount($vCode, $email) {
$email = urldecode($email);
if($userId = $this->model->userIdByEmail($email))
{
$actualCode = $this->model->getUsersVerificationCodes(‘code’, ‘userId’, $userId);
if($actualCode != $vCode)
{
$output = ‘Invalid code or email.’;
} else {
$output = ‘Success!’;
}
} else {
$output = ‘Invalid code or email.’;
}

    echo $output;

}

End Note

Implementing email verification for new registrations in WooCommerce is essential in maintaining the security and integrity of your online store. By using the methods outlined in this guide, including plugins like the User Email Verification for WooCommerce plugin, you can effectively reduce spam accounts, ensure genuine user registrations, and enhance your store’s overall user experience. Customizing verification processes and notices to fit your specific needs not only helps in better managing your customer base but also in targeting your marketing efforts more accurately.

Sign up to get Latest Updates

For more digital insights, sign up for the latest updates and industry news right in your inbox.