| 1 |
<?php |
| 2 |
|
| 3 |
namespace Extendify\Shared\Services\PluginsActivation; |
| 4 |
|
| 5 |
defined('ABSPATH') || die('No direct access.'); |
| 6 |
|
| 7 |
class TranslatePress extends PluginActivation |
| 8 |
{ |
| 9 |
// phpcs:ignore PSR12.Properties.ConstantVisibility.NotFound |
| 10 |
const API_URL = 'https://translatepress.com/wp-json/tpext/v1/free-license'; |
| 11 |
|
| 12 |
public static function slug(): string |
| 13 |
{ |
| 14 |
return 'translatepress-multilingual'; |
| 15 |
} |
| 16 |
|
| 17 |
protected static function saveKey(array $data) |
| 18 |
{ |
| 19 |
$key = $data['license_key'] ?? null; |
| 20 |
|
| 21 |
if (!$key) { |
| 22 |
return; |
| 23 |
} |
| 24 |
|
| 25 |
\update_option('trp_license_key', \sanitize_text_field($key)); |
| 26 |
} |
| 27 |
} |
| 28 |
|