Merge pull request #20913 from shoheitanaka/patch-15
If email @local include non alphabet
This commit is contained in:
commit
28f1aed9b0
|
@ -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' ), '<strong>' . esc_html( $field_label ) . '</strong>' ) );
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue