# "Confirm Email" Field at EDD Checkout

> Asks guest buyers to type their email address twice on the Easy Digital Downloads checkout, preventing typos that would stop their download links arriving.

- Type: PHP
- Runs: Run everywhere
- Category: [Easy Digital Downloads](https://wpide.com/library/category/edd/)
- Requires: Easy Digital Downloads
- Tags: edd, checkout, email, validation
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/edd-confirm-email-field/

## Code

```php
add_action( 'edd_purchase_form_after_email', function () {
    if ( is_user_logged_in() ) {
        return;
    }
    ?>
    <p id="edd-email-confirm-wrap">
        <label class="edd-label" for="edd-email-confirm"><?php echo esc_html( 'Confirm email address' ); ?> <span class="edd-required-indicator">*</span></label>
        <input class="edd-input required" type="email" name="edd_email_confirm" id="edd-email-confirm" autocomplete="email" required>
    </p>
    <?php
} );

add_action( 'edd_checkout_error_checks', function ( $valid_data, $post ) {
    if ( is_user_logged_in() || ! isset( $post['edd_email'] ) ) {
        return;
    }

    if ( strtolower( trim( (string) $post['edd_email'] ) ) !== strtolower( trim( (string) ( $post['edd_email_confirm'] ?? '' ) ) ) ) {
        edd_set_error( 'wpide_email_mismatch', 'The email addresses do not match. Please check them.' );
    }
}, 10, 2 );
```

## Notes

Logged-in customers do not see the extra field.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find ""Confirm Email" Field at EDD Checkout" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
