Merge pull request #14887 from woocommerce/fix/14850

Fixed warning when no customer country is defined.
This commit is contained in:
Claudiu Lodromanean 2017-05-05 08:39:27 -07:00 committed by GitHub
commit e005fe0207
1 changed files with 1 additions and 1 deletions

View File

@ -1981,7 +1981,7 @@ if ( ! function_exists( 'woocommerce_form_field' ) ) {
$field .= '<input type="hidden" class="hidden" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" value="" ' . implode( ' ', $custom_attributes ) . ' placeholder="' . esc_attr( $args['placeholder'] ) . '" />';
} elseif ( is_array( $states ) ) {
} elseif ( ! is_null( $current_cc ) && is_array( $states ) ) {
$field .= '<select name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" class="state_select ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" ' . implode( ' ', $custom_attributes ) . ' data-placeholder="' . esc_attr( $args['placeholder'] ) . '">
<option value="">' . esc_html__( 'Select a state&hellip;', 'woocommerce' ) . '</option>';