Fixed issue
This commit is contained in:
parent
6b9bd2259f
commit
2adadd5737
|
@ -626,10 +626,10 @@ class WC_Checkout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( in_array( 'email', $format ) && '' !== $data[ $key ] ) {
|
if ( in_array( 'email', $format ) ) {
|
||||||
$data[ $key ] = sanitize_email( $data[ $key ] );
|
$data[ $key ] = sanitize_email( $data[ $key ] );
|
||||||
|
|
||||||
if ( ! is_email( $data[ $key ] ) ) {
|
if ( '' !== $data[ $key ] && ! is_email( $data[ $key ] ) ) {
|
||||||
/* translators: %s: email address */
|
/* translators: %s: email address */
|
||||||
$errors->add( 'validation', sprintf( __( '%s is not a valid email address.', 'woocommerce' ), '<strong>' . $field_label . '</strong>' ) );
|
$errors->add( 'validation', sprintf( __( '%s is not a valid email address.', 'woocommerce' ), '<strong>' . $field_label . '</strong>' ) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue