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

@@ 389-395 (lines=7) @@
386
			$postcode = wc_format_postcode( $postcode, $country );
387
		}
388
389
		if ( $country ) {
390
			WC()->customer->set_location( $country, $state, $postcode, $city );
391
			WC()->customer->set_shipping_location( $country, $state, $postcode, $city );
392
		} else {
393
			WC()->customer->set_to_base();
394
			WC()->customer->set_shipping_to_base();
395
		}
396
397
		WC()->customer->calculated_shipping( true );
398