Code Duplication    Length = 11-11 lines in 2 locations

includes/shipping/local-pickup/class-wc-shipping-local-pickup.php 1 location

@@ 83-93 (lines=11) @@
80
	 * Get postcodes for this method.
81
	 * @return array
82
	 */
83
	public function get_valid_postcodes() {
84
		$codes = array();
85
86
		if ( $this->codes != '' ) {
87
			foreach( explode( ',', $this->codes ) as $code ) {
88
				$codes[] = strtoupper( trim( $code ) );
89
			}
90
		}
91
92
		return $codes;
93
	}
94
95
	/**
96
	 * See if a given postcode matches valid postcodes.

includes/shipping/legacy-local-pickup/class-wc-shipping-legacy-local-pickup.php 1 location

@@ 136-146 (lines=11) @@
133
	 * Get postcodes for this method.
134
	 * @return array
135
	 */
136
	public function get_valid_postcodes() {
137
		$codes = array();
138
139
		if ( $this->codes != '' ) {
140
			foreach( explode( ',', $this->codes ) as $code ) {
141
				$codes[] = strtoupper( trim( $code ) );
142
			}
143
		}
144
145
		return $codes;
146
	}
147
148
	/**
149
	 * See if a given postcode matches valid postcodes.