WC_Data::__wakeup()publicWC 1.0

Re-run the constructor with the object ID.

If the object no longer exists, remove the ID.

Method of the class: WC_Data{}

No Hooks.

Return

null. Nothing (null).

Usage

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

WC_Data::__wakeup() code 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 );
	}
}