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

@@ 392-403 (lines=12) @@
389
	/**
390
	 * Check if this gateway is enabled
391
	 */
392
	public function is_available() {
393
		if ( 'yes' === $this->enabled ) {
394
			if ( ! $this->testmode && is_checkout() && ! is_ssl() ) {
395
				return false;
396
			}
397
			if ( ! $this->secret_key || ! $this->publishable_key ) {
398
				return false;
399
			}
400
			return true;
401
		}
402
		return false;
403
	}
404
405
	/**
406
	 * Initialise Gateway Settings Form Fields