| @@ 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 |
|
| @@ 262-273 (lines=12) @@ | ||
| 259 | /** |
|
| 260 | * Check if this gateway is enabled |
|
| 261 | */ |
|
| 262 | public function is_available() { |
|
| 263 | if ( 'yes' === $this->enabled ) { |
|
| 264 | if ( ! $this->testmode && is_checkout() && ! is_ssl() ) { |
|
| 265 | return false; |
|
| 266 | } |
|
| 267 | if ( ! $this->secret_key || ! $this->publishable_key ) { |
|
| 268 | return false; |
|
| 269 | } |
|
| 270 | return true; |
|
| 271 | } |
|
| 272 | return false; |
|
| 273 | } |
|
| 274 | ||
| 275 | /** |
|
| 276 | * Initialise Gateway Settings Form Fields |
|