| @@ 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 |
|
| @@ 312-323 (lines=12) @@ | ||
| 309 | /** |
|
| 310 | * Check if this gateway is enabled |
|
| 311 | */ |
|
| 312 | public function is_available() { |
|
| 313 | if ( 'yes' === $this->enabled ) { |
|
| 314 | if ( ! $this->testmode && is_checkout() && ! is_ssl() ) { |
|
| 315 | return false; |
|
| 316 | } |
|
| 317 | if ( ! $this->secret_key || ! $this->publishable_key ) { |
|
| 318 | return false; |
|
| 319 | } |
|
| 320 | return true; |
|
| 321 | } |
|
| 322 | return false; |
|
| 323 | } |
|
| 324 | ||
| 325 | /** |
|
| 326 | * Initialise Gateway Settings Form Fields |
|