Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 172-183 (lines=12) @@
169
	/**
170
	 * Check if this gateway is enabled
171
	 */
172
	public function is_available() {
173
		if ( 'yes' === $this->enabled ) {
174
			if ( ! $this->testmode && is_checkout() && ! is_ssl() ) {
175
				return false;
176
			}
177
			if ( ! $this->secret_key || ! $this->publishable_key ) {
178
				return false;
179
			}
180
			return true;
181
		}
182
		return false;
183
	}
184
185
	/**
186
	 * Initialise Gateway Settings Form Fields

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

@@ 230-241 (lines=12) @@
227
	/**
228
	 * Check if this gateway is enabled
229
	 */
230
	public function is_available() {
231
		if ( 'yes' === $this->enabled ) {
232
			if ( ! $this->testmode && is_checkout() && ! is_ssl() ) {
233
				return false;
234
			}
235
			if ( ! $this->secret_key || ! $this->publishable_key ) {
236
				return false;
237
			}
238
			return true;
239
		}
240
		return false;
241
	}
242
243
	/**
244
	 * Initialise Gateway Settings Form Fields