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

@@ 384-395 (lines=12) @@
381
	/**
382
	 * Check if this gateway is enabled
383
	 */
384
	public function is_available() {
385
		if ( 'yes' === $this->enabled ) {
386
			if ( ! $this->testmode && is_checkout() && ! is_ssl() ) {
387
				return false;
388
			}
389
			if ( ! $this->secret_key || ! $this->publishable_key ) {
390
				return false;
391
			}
392
			return true;
393
		}
394
		return false;
395
	}
396
397
	/**
398
	 * Initialise Gateway Settings Form Fields