How to Add a Confirm Email Address Field to the WooCommerce Checkout

How to Add a Confirm Email Address Field to the WooCommerce Checkout
On this page
  1. Why Add an Email Confirmation Field
  2. Step 1: Add the Confirmation Field
  3. Step 2: Validate That Both Emails Match
  4. Troubleshooting
  5. Frequently Asked Questions
  6. Conclusion

You can add a Confirm Email Address field to the WooCommerce checkout by placing a second email input beside the default billing email field and validating that both entries match before the order is allowed to process, reducing failed order confirmations caused by mistyped addresses.

Why Add an Email Confirmation Field

  • Prevents lost order confirmations and shipping updates from typos
  • Reduces support requests from customers who never received their receipt
  • Especially valuable for digital products where the email is the only delivery method

Step 1: Add the Confirmation Field

PHP
/** Add a side-by-side "Confirm Email" field next to billing email at checkout */
add_filter( 'woocommerce_checkout_fields', 'add_email_confirmation_checkout_field' );

function add_email_confirmation_checkout_field( $fields ) {

    $fields['billing']['billing_email']['class'] = array( 'form-row-first' );

    $fields['billing']['billing_email_confirm'] = array(
        'label'    => 'Confirm Email Address',
        'required' => true,
        'class'    => array( 'form-row-last' ),
        'clear'    => true,
        'priority' => 115,
    );

    return $fields;
}

Step 2: Validate That Both Emails Match

PHP
/** Block checkout if the two email fields don't match */
add_action( 'woocommerce_checkout_process', 'validate_matching_email_fields' );

function validate_matching_email_fields() {

    $primary_email = isset( $_POST['billing_email'] ) ? sanitize_email( $_POST['billing_email'] ) : '';
    $confirm_email = isset( $_POST['billing_email_confirm'] ) ? sanitize_email( $_POST['billing_email_confirm'] ) : '';

    if ( $primary_email !== $confirm_email ) {
        wc_add_notice( 'Your email addresses do not match. Please check and try again.', 'error' );
    }
}
Add a confirm email address field to the WooCommerce checkout: the page before adding the code
Before
Add a confirm email address field to the WooCommerce checkout: the page after adding the code
After

Troubleshooting

Fields Don’t Sit Side by Side

Confirm the priority value places the confirm field immediately after the original email field, and that both fields’ CSS classes (form-row-first / form-row-last) match your theme’s grid expectations.

Autofill Fills Both Fields With the Same Value Automatically

This somewhat defeats the purpose of a confirmation field, but it’s expected browser behavior — some stores add a autocomplete="off" attribute to the confirmation field to discourage autofill, though this isn’t foolproof across all browsers.

Validation Doesn’t Trigger

Double-check the field names in the validation function exactly match the field keys used in the display function — a mismatch causes the check to silently compare empty strings.

Frequently Asked Questions

Does this work with the checkout block too?

This snippet targets the classic checkout specifically — the newer checkout block requires a different customization approach for custom fields.

Can I make the confirm field optional instead of required?

Yes — set 'required' => false, though this weakens the purpose of the field since a blank confirmation wouldn’t be validated.

Should I disable copy-paste on the confirm field?

Some stores do this via JavaScript to force customers to actually retype the email, though it can frustrate legitimate users — weigh the tradeoff based on your customer base.

Conclusion

Adding a Confirm Email Address field to the WooCommerce checkout is a two-part snippet: displaying the extra field, then validating that both entries match before the order proceeds. It’s a small addition that can meaningfully cut down on lost order communications.

See also How to Move the Email Field to the Top of WooCommerce Checkout. Then read How to Add a Custom Checkout Field in WooCommerce.

Prefer no code? All-in-One Utilities Woo Add-on adds over 50 WooCommerce features, so you can switch them on without code.

Leave a Reply

Schedule a call