Merge pull request #29133 from woocommerce/fix/notice
Check if index value is set before accessing
This commit is contained in:
commit
ea7c6700bc
|
@ -747,7 +747,7 @@ class WC_Checkout {
|
|||
$field_label = isset( $field['label'] ) ? $field['label'] : '';
|
||||
|
||||
if ( $validate_fieldset &&
|
||||
'country' === $field['type'] &&
|
||||
( isset( $field['type'] ) && 'country' === $field['type'] ) &&
|
||||
! WC()->countries->country_exists( $data[ $key ] ) ) {
|
||||
/* translators: ISO 3166-1 alpha-2 country code */
|
||||
$errors->add( $key . '_validation', sprintf( __( "'%s' is not a valid country code.", 'woocommerce' ), $data[ $key ] ) );
|
||||
|
|
Loading…
Reference in New Issue