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

@@ 508-514 (lines=7) @@
505
			$postcode = wc_format_postcode( $postcode, $country );
506
		}
507
508
		if ( $country ) {
509
			WC()->customer->set_location( $country, $state, $postcode, $city );
510
			WC()->customer->set_shipping_location( $country, $state, $postcode, $city );
511
		} else {
512
			WC()->customer->set_to_base();
513
			WC()->customer->set_shipping_to_base();
514
		}
515
516
		WC()->customer->calculated_shipping( true );
517