| @@ 405-416 (lines=12) @@ | ||
| 402 | /** |
|
| 403 | * Check if this gateway is enabled |
|
| 404 | */ |
|
| 405 | public function is_available() { |
|
| 406 | if ( 'yes' === $this->enabled ) { |
|
| 407 | if ( ! $this->testmode && is_checkout() && ! is_ssl() ) { |
|
| 408 | return false; |
|
| 409 | } |
|
| 410 | if ( ! $this->secret_key || ! $this->publishable_key ) { |
|
| 411 | return false; |
|
| 412 | } |
|
| 413 | return true; |
|
| 414 | } |
|
| 415 | return false; |
|
| 416 | } |
|
| 417 | ||
| 418 | /** |
|
| 419 | * Initialise Gateway Settings Form Fields |
|
| @@ 174-185 (lines=12) @@ | ||
| 171 | /** |
|
| 172 | * Check if this gateway is enabled |
|
| 173 | */ |
|
| 174 | public function is_available() { |
|
| 175 | if ( 'yes' === $this->enabled ) { |
|
| 176 | if ( ! $this->testmode && is_checkout() && ! is_ssl() ) { |
|
| 177 | return false; |
|
| 178 | } |
|
| 179 | if ( ! $this->secret_key || ! $this->publishable_key ) { |
|
| 180 | return false; |
|
| 181 | } |
|
| 182 | return true; |
|
| 183 | } |
|
| 184 | return false; |
|
| 185 | } |
|
| 186 | ||
| 187 | /** |
|
| 188 | * Initialise Gateway Settings Form Fields |
|