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

@@ 349-355 (lines=7) @@
346
			$postcode = wc_format_postcode( $postcode, $country );
347
		}
348
349
		if ( $country ) {
350
			WC()->customer->set_location( $country, $state, $postcode, $city );
351
			WC()->customer->set_shipping_location( $country, $state, $postcode, $city );
352
		} else {
353
			WC()->customer->set_to_base();
354
			WC()->customer->set_shipping_to_base();
355
		}
356
357
		WC()->customer->calculated_shipping( true );
358