Code Duplication    Length = 7-7 lines in 2 locations

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

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

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

@@ 305-311 (lines=7) @@
302
			$postcode = wc_format_postcode( $postcode, $country );
303
		}
304
305
		if ( $country ) {
306
			WC()->customer->set_location( $country, $state, $postcode, $city );
307
			WC()->customer->set_shipping_location( $country, $state, $postcode, $city );
308
		} else {
309
			WC()->customer->set_to_base();
310
			WC()->customer->set_shipping_to_base();
311
		}
312
313
		WC()->customer->calculated_shipping( true );
314