Code Duplication    Length = 2-3 lines in 3 locations

templates/cart/shipping-calculator.php 1 location

@@ 65-66 (lines=2) @@
62
						<select name="calc_shipping_state" id="calc_shipping_state" placeholder="<?php esc_attr_e( 'State / county', 'woocommerce' ); ?>">
63
							<option value=""><?php _e( 'Select a state&hellip;', 'woocommerce' ); ?></option>
64
							<?php
65
								foreach ( $states as $ckey => $cvalue )
66
									echo '<option value="' . esc_attr( $ckey ) . '" ' . selected( $current_r, $ckey, false ) . '>' . __( esc_html( $cvalue ), 'woocommerce' ) .'</option>';
67
							?>
68
						</select>
69
					</span><?php

includes/wc-template-functions.php 2 locations

@@ 1894-1896 (lines=3) @@
1891
					$field = '<select name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" ' . $args['autocomplete'] . ' class="country_to_state country_select ' . esc_attr( implode( ' ', $args['input_class'] ) ) .'" ' . implode( ' ', $custom_attributes ) . '>'
1892
							. '<option value="">'.__( 'Select a country&hellip;', 'woocommerce' ) .'</option>';
1893
1894
					foreach ( $countries as $ckey => $cvalue ) {
1895
						$field .= '<option value="' . esc_attr( $ckey ) . '" '. selected( $value, $ckey, false ) . '>'. __( $cvalue, 'woocommerce' ) .'</option>';
1896
					}
1897
1898
					$field .= '</select>';
1899
@@ 1923-1925 (lines=3) @@
1920
					$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'] ) . '" ' . $args['autocomplete'] . '>
1921
						<option value="">'.__( 'Select a state&hellip;', 'woocommerce' ) .'</option>';
1922
1923
					foreach ( $states as $ckey => $cvalue ) {
1924
						$field .= '<option value="' . esc_attr( $ckey ) . '" '.selected( $value, $ckey, false ) .'>'.__( $cvalue, 'woocommerce' ) .'</option>';
1925
					}
1926
1927
					$field .= '</select>';
1928