Code Duplication    Length = 12-12 lines in 2 locations

includes/payment-methods/class-wc-stripe-payment-request.php 2 locations

@@ 1058-1069 (lines=12) @@
1055
		$billing_state    = ! empty( $_POST['billing_state'] ) ? wc_clean( $_POST['billing_state'] ) : '';
1056
		$shipping_state   = ! empty( $_POST['shipping_state'] ) ? wc_clean( $_POST['shipping_state'] ) : '';
1057
1058
		if ( $billing_state && $billing_country ) {
1059
			$valid_states = WC()->countries->get_states( $billing_country );
1060
1061
			// Valid states found for country.
1062
			if ( ! empty( $valid_states ) && is_array( $valid_states ) && sizeof( $valid_states ) > 0 ) {
1063
				foreach ( $valid_states as $state_abbr => $state ) {
1064
					if ( preg_match( '/' . preg_quote( $state ) . '/i', $billing_state ) ) {
1065
						$_POST['billing_state'] = $state_abbr;
1066
					}
1067
				}
1068
			}
1069
		}
1070
1071
		if ( $shipping_state && $shipping_country ) {
1072
			$valid_states = WC()->countries->get_states( $shipping_country );
@@ 1071-1082 (lines=12) @@
1068
			}
1069
		}
1070
1071
		if ( $shipping_state && $shipping_country ) {
1072
			$valid_states = WC()->countries->get_states( $shipping_country );
1073
1074
			// Valid states found for country.
1075
			if ( ! empty( $valid_states ) && is_array( $valid_states ) && sizeof( $valid_states ) > 0 ) {
1076
				foreach ( $valid_states as $state_abbr => $state ) {
1077
					if ( preg_match( '/' . preg_quote( $state ) . '/i', $shipping_state ) ) {
1078
						$_POST['shipping_state'] = $state_abbr;
1079
					}
1080
				}
1081
			}
1082
		}
1083
	}
1084
1085
	/**