WC_Data::__wakeup()publicWC 1.0

Re-run the constructor with the object ID.

If the object no longer exists, remove the ID.

{} It's a method of the class: WC_Data{}

No Hooks.

Return

null. Nothing.

Usage

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

Code of WC_Data::__wakeup() WC 6.8.2

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