diff --git a/includes/class-wc-checkout.php b/includes/class-wc-checkout.php index 64236abd826..edab882884d 100644 --- a/includes/class-wc-checkout.php +++ b/includes/class-wc-checkout.php @@ -697,9 +697,10 @@ class WC_Checkout { } if ( in_array( 'email', $format, true ) && '' !== $data[ $key ] ) { + $email_is_valid = is_email( $data[ $key ] ); $data[ $key ] = sanitize_email( $data[ $key ] ); - if ( $validate_fieldset && ! is_email( $data[ $key ] ) ) { + if ( $validate_fieldset && ! $email_is_valid ) { /* translators: %s: email address */ $errors->add( 'validation', sprintf( __( '%s is not a valid email address.', 'woocommerce' ), '' . esc_html( $field_label ) . '' ) ); continue;