Code Duplication    Length = 9-9 lines in 2 locations

includes/class-wc-stripe-apple-pay.php 2 locations

@@ 227-235 (lines=9) @@
224
			return;
225
		}
226
227
		if ( is_single() ) {
228
			global $post;
229
230
			$product = wc_get_product( $post->ID );
231
232
			if ( ! in_array( ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $product->product_type : $product->get_type() ), $this->supported_product_types() ) ) {
233
				return;
234
			}
235
		}
236
237
		$apple_pay_button = ! empty( $this->_gateway_settings['apple_pay_button'] ) ? $this->_gateway_settings['apple_pay_button'] : 'black';
238
		$button_lang      = ! empty( $this->_gateway_settings['apple_pay_button_lang'] ) ? strtolower( $this->_gateway_settings['apple_pay_button_lang'] ) : 'en';
@@ 266-274 (lines=9) @@
263
			return;
264
		}
265
266
		if ( is_single() ) {
267
			global $post;
268
269
			$product = wc_get_product( $post->ID );
270
271
			if ( ! in_array( ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $product->product_type : $product->get_type() ), $this->supported_product_types() ) ) {
272
				return;
273
			}
274
		}
275
		?>
276
		<p class="apple-pay-button-checkout-separator">- <?php esc_html_e( 'Or', 'woocommerce-gateway-stripe' ); ?> -</p>
277
		<?php