Code Duplication    Length = 7-7 lines in 2 locations

includes/class-wc-stripe-apple-pay.php 1 location

@@ 220-226 (lines=7) @@
217
			$postcode = wc_format_postcode( $postcode, $country );
218
		}
219
220
		if ( $country ) {
221
			WC()->customer->set_location( $country, $state, $postcode, $city );
222
			WC()->customer->set_shipping_location( $country, $state, $postcode, $city );
223
		} else {
224
			WC()->customer->set_to_base();
225
			WC()->customer->set_shipping_to_base();
226
		}
227
228
		WC()->customer->calculated_shipping( true );
229

includes/class-wc-stripe-payment-request.php 1 location

@@ 155-161 (lines=7) @@
152
			$postcode = wc_format_postcode( $postcode, $country );
153
		}
154
155
		if ( $country ) {
156
			WC()->customer->set_location( $country, $state, $postcode, $city );
157
			WC()->customer->set_shipping_location( $country, $state, $postcode, $city );
158
		} else {
159
			WC()->customer->set_to_base();
160
			WC()->customer->set_shipping_to_base();
161
		}
162
163
		WC()->customer->calculated_shipping( true );
164