How many times did you want to get in touch with your customer after they purchased but their email address was wrong, or they contacted you to change it since they had a typo? I feel this is a common issue with many shop owners. The easy solution is to force customers to confirm the email address on the Checkout page.
Let’s see how to do it!
As you probably guessed, this requires a little snippet. Open your functions.php file in wp-content/themes/your-child-theme-name/ and add this code at the end of the file:
The first function adds the field. You can change its label there. You can also change how the field looks like, maybe you want this to show on the same row as the Billing Email field. If you want to do that, I recommend checking this article on the WooCommerce documentation about Customizing checkout fields using actions and filters.
The second function instead confirms if the billing email matches the confirmation billing email. If not, it shows an error on the Checkout page and stops the checkout process. The system will already take care of verifying that the email confirmation field is not empty, so we do not need to verify that ourselves, but we how an error only if the field is not empty. This is because otherwise it would show the matching error even if the Confirm Email Address field is empty, which I did not like.
This is how it looks like on Storefront:

Did you ever have an issue with wrong billing data on your store? Tell me about it in the comments!
Contribute to Improving This Blog
Did you enjoy this article? Was it helpful? Contribute to help me writing more articles! The funds collected from this blog are reinvested directly into improving my skills or the blog so that I can provide more and better content!
Make a one-time donation
Make a monthly donation
Make a yearly donation
Choose an amount
Or enter a custom amount
Your contribution is appreciated.
Your contribution is appreciated.
Your contribution is appreciated.
DonateDonate monthlyDonate yearlyDo you prefer using cryptocurrency? I’ve got you covered! You can donate at the following wallets:
- BTC: bc1q87nxpdpqw323ccmerrzyeffs72wnxpw93x7pzk / 17Gtc5e8yoh2LZzokoyK8P5DWbToBwztok
- ETH: 0xA5C89Be1df2896C3942DBEf751cCeacC7929388b
Leave a Reply