WC_Data::__wakeup()

Re-run the constructor with the object ID.


Description Description

If the object no longer exists, remove the ID.


Source Source

File: includes/abstracts/abstract-wc-data.php

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


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.