| @@ 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 |
|
| @@ 246-257 (lines=12) @@ | ||
| 243 | /** |
|
| 244 | * Check if this gateway is enabled |
|
| 245 | */ |
|
| 246 | public function is_available() { |
|
| 247 | if ( 'yes' === $this->enabled ) { |
|
| 248 | if ( ! $this->testmode && is_checkout() && ! is_ssl() ) { |
|
| 249 | return false; |
|
| 250 | } |
|
| 251 | if ( ! $this->secret_key || ! $this->publishable_key ) { |
|
| 252 | return false; |
|
| 253 | } |
|
| 254 | return true; |
|
| 255 | } |
|
| 256 | return false; |
|
| 257 | } |
|
| 258 | ||
| 259 | /** |
|
| 260 | * Initialise Gateway Settings Form Fields |
|