Last active
April 11, 2024 09:17
-
-
Save mihdan/5e00ed4c165a1f5e5663 to your computer and use it in GitHub Desktop.
Занулить yoast-seo-premium
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 1. В таблице wp_options находим ключ yoast-seo-premium_license или wordpress-seo-premium_license | |
* и меняем его значение на `a:3:{s:3:"key";s:6:"zalupa";s:6:"status";s:5:"valid";s:11:"expiry_date";s:19:"2970-01-01 00:00:00";}` | |
* | |
* 2. Чтобы не слетали все ваши махинации после захода на страницу обновления или проверки лицензии, | |
* достаточно запретить плагину ломиться по своему АПИ на свой сайт. | |
* Я это сделал просто: в файле \wordpress-seo-premium\vendor\yoast\license-manager\class-update-manager.php | |
*/ | |
protected function get_remote_data() { | |
return false; | |
// тут остальной код | |
} | |
/** | |
* 2.1 Или в файле \wordpress-seo-premium\vendor\yoast\license-manager\class-license-manager.php | |
*/ | |
public function license_is_valid() { | |
return true; | |
//return ( $this->get_license_status() === 'valid' ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sorry