WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
функция не описана

Yoast_License_Manager::deactivate_license() public Yoast 1.0

Remotely deactivate License

{} Это метод класса: Yoast_License_Manager{}

Хуков нет.

Возвращает

true/false. True if the license is now deactivated, false if not

Использование

$Yoast_License_Manager = new Yoast_License_Manager();
$Yoast_License_Manager->deactivate_license();

Код Yoast_License_Manager::deactivate_license() Yoast 15.1.1

<?php
public function deactivate_license() {

	$result = $this->call_license_api( 'deactivate' );

	if ( $result ) {

		// show notice if license is deactivated
		if ( $result->license === 'deactivated' ) {
			$success = true;
			$message = sprintf( __( "Your %s license has been deactivated.", $this->product->get_text_domain() ), $this->product->get_item_name() );
		} else {
			$success = false;
			$message = sprintf( __( "Failed to deactivate your %s license.", $this->product->get_text_domain() ), $this->product->get_item_name() );
		}

		$message .= $this->get_custom_message( $result );

		// Append custom HTML message to default message.
		if ( $this->show_license_notice() ) {
			$this->set_notice( $message, $success );
		}

		$this->set_license_status( $result->license );
	}

	return ( $this->get_license_status() === 'deactivated' );
}