WC_Data::__wakeup()publicWC 1.0

Re-run the constructor with the object ID.

If the object no longer exists, remove the ID.

Метод класса: WC_Data{}

Хуков нет.

Возвращает

null. Ничего (null).

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

$WC_Data = new WC_Data();
$WC_Data->__wakeup();

Код WC_Data::__wakeup() WC 8.7.0

public function __wakeup() {
	try {
		$this->__construct( absint( $this->id ) );
	} catch ( Exception $e ) {
		$this->set_id( 0 );
		$this->set_object_read( true );
	}
}