Code Duplication    Length = 7-9 lines in 2 locations

includes/class-wc-gateway-stripe.php 1 location

@@ 321-329 (lines=9) @@
318
			data-three-d-secure="' . esc_attr( $this->three_d_secure ? 'true' : 'false' ) . '"
319
			data-allow-remember-me="' . esc_attr( apply_filters( 'wc_stripe_allow_remember_me', true ) ? 'true' : 'false' ) . '">';
320
321
		if ( $this->description ) {
322
			if ( $this->testmode ) {
323
				/* translators: link to Stripe testing page */
324
				$this->description .= ' ' . sprintf( __( 'TEST MODE ENABLED. In test mode, you can use the card number 4242424242424242 with any CVC and a valid expiration date or check the <a href="%s" target="_blank">Testing Stripe documentation</a> for more card numbers.', 'woocommerce-gateway-stripe' ), 'https://stripe.com/docs/testing' );
325
				$this->description  = trim( $this->description );
326
			}
327
328
			echo apply_filters( 'wc_stripe_description', wpautop( wp_kses_post( $this->description ) ), $this->id );
329
		}
330
331
		if ( $display_tokenization ) {
332
			$this->tokenization_script();

includes/payment-methods/class-wc-gateway-stripe-sepa.php 1 location

@@ 268-274 (lines=7) @@
265
			data-amount="' . esc_attr( WC_Stripe_Helper::get_stripe_amount( $total ) ) . '"
266
			data-currency="' . esc_attr( strtolower( get_woocommerce_currency() ) ) . '">';
267
268
		if ( $this->description ) {
269
			if ( $this->testmode ) {
270
				$this->description .= ' ' . __( 'TEST MODE ENABLED. In test mode, you can use IBAN number DE89370400440532013000.', 'woocommerce-gateway-stripe' );
271
				$this->description  = trim( $this->description );
272
			}
273
			echo apply_filters( 'wc_stripe_description', wpautop( wp_kses_post( $this->description ) ), $this->id );
274
		}
275
276
		if ( $display_tokenization ) {
277
			$this->tokenization_script();