Copy this code in final of wordpress-seo-premium.phpnull master, please teach us how to null Yoast SEO full without having issues?
$site_information = get_transient( 'wpseo_site_information' );
if ( isset( $site_information->subscriptions ) && ( count( $site_information->subscriptions ) == 0 ) ) {
delete_transient( 'wpseo_site_information' );
delete_transient( 'wpseo_site_information_quick' );
}
add_filter( 'pre_http_request', function( $pre, $parsed_args, $url ){
$site_information = (object) [
'subscriptions' => [
(object) [
'product' => (object) [ 'slug' => 'yoast-seo-wordpress-premium' ],
'expiryDate' => '+5 years'
],
(object) [
'product' => (object) [ 'slug' => 'yoast-seo-news' ],
'expiryDate' => '+5 years'
],
(object) [
'product' => (object) [ 'slug' => 'yoast-seo-woocommerce' ],
'expiryDate' => '+5 years'
],
(object) [
'product' => (object) [ 'slug' => 'yoast-seo-video' ],
'expiryDate' => '+5 years'
],
(object) [
'product' => (object) [ 'slug' => 'yoast-seo-local' ],
'expiryDate' => '+5 years'
]
],
];
if ( strpos( $url, 'https://my.yoast.com/api/sites/current' ) !== false ) {
return [
'response' => [ 'code' => 200, 'message' => 'ОК' ],
'body' => json_encode( $site_information )
];
} else {
return false;
}
}, 10, 3 );