Code Duplication    Length = 3-4 lines in 2 locations

includes/class-wc-checkout.php 2 locations

@@ 729-732 (lines=4) @@
726
727
					if ( $validate_fieldset && '' !== $data[ $key ] && ! WC_Validation::is_postcode( $data[ $key ], $country ) ) {
728
						switch ( $country ) {
729
							case 'IE':
730
								/* translators: %1$s: field name, %2$s finder.eircode.ie URL */
731
								$postcode_validation_notice = sprintf( __( '%1$s is not valid. You can look up the correct Eircode <a target="_blank" href="%2$s">here</a>.', 'woocommerce' ), '<strong>' . esc_html( $field_label ) . '</strong>', 'https://finder.eircode.ie' );
732
								break;
733
							default:
734
								/* translators: %s: field name */
735
								$postcode_validation_notice = sprintf( __( '%s is not a valid postcode / ZIP.', 'woocommerce' ), '<strong>' . esc_html( $field_label ) . '</strong>' );
@@ 733-735 (lines=3) @@
730
								/* translators: %1$s: field name, %2$s finder.eircode.ie URL */
731
								$postcode_validation_notice = sprintf( __( '%1$s is not valid. You can look up the correct Eircode <a target="_blank" href="%2$s">here</a>.', 'woocommerce' ), '<strong>' . esc_html( $field_label ) . '</strong>', 'https://finder.eircode.ie' );
732
								break;
733
							default:
734
								/* translators: %s: field name */
735
								$postcode_validation_notice = sprintf( __( '%s is not a valid postcode / ZIP.', 'woocommerce' ), '<strong>' . esc_html( $field_label ) . '</strong>' );
736
						}
737
						$errors->add( 'validation', apply_filters( 'woocommerce_checkout_postcode_validation_notice', $postcode_validation_notice, $country, $data[ $key ] ) );
738
					}