Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 546-552 (lines=7) @@
543
			$postcode = wc_format_postcode( $postcode, $country );
544
		}
545
546
		if ( $country ) {
547
			WC()->customer->set_location( $country, $state, $postcode, $city );
548
			WC()->customer->set_shipping_location( $country, $state, $postcode, $city );
549
		} else {
550
			WC()->customer->set_to_base();
551
			WC()->customer->set_shipping_to_base();
552
		}
553
554
		if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
555
			WC()->customer->calculated_shipping( true );

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

@@ 170-176 (lines=7) @@
167
			$postcode = wc_format_postcode( $postcode, $country );
168
		}
169
170
		if ( $country ) {
171
			WC()->customer->set_location( $country, $state, $postcode, $city );
172
			WC()->customer->set_shipping_location( $country, $state, $postcode, $city );
173
		} else {
174
			WC()->customer->set_to_base();
175
			WC()->customer->set_shipping_to_base();
176
		}
177
178
		if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
179
			WC()->customer->calculated_shipping( true );