Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 147-151 (lines=5) @@
144
		// Note: display error is in the parent class.
145
		add_action( 'admin_notices', array( $this, 'display_errors' ), 9999 );
146
147
		if ( WC_Stripe_Helper::is_pre_orders_exists() ) {
148
			$this->pre_orders = new WC_Stripe_Pre_Orders_Compat();
149
150
			add_action( 'wc_pre_orders_process_pre_order_completion_payment_' . $this->id, array( $this->pre_orders, 'process_pre_order_release_payment' ) );
151
		}
152
	}
153
154
	/**

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

@@ 124-128 (lines=5) @@
121
        
122
		add_action( 'woocommerce_order_status_changed', array( $this, 'maybe_activate_subscriptions_early'), 10, 4 );
123
124
		if ( WC_Stripe_Helper::is_pre_orders_exists() ) {
125
			$this->pre_orders = new WC_Stripe_Pre_Orders_Compat();
126
127
			add_action( 'wc_pre_orders_process_pre_order_completion_payment_' . $this->id, array( $this->pre_orders, 'process_pre_order_release_payment' ) );
128
		}
129
	}
130
131
	/**