ActionScheduler_Abstract_RecurringSchedule::__wakeup()publicWC 1.0

Unserialize recurring schedules serialized/stored prior to AS 3.0.0

Prior to Action Scheduler 3.0.0, schedules used different property names to refer to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp was the same as ActionScheduler_SimpleSchedule::timestamp. This was addressed in Action Scheduler 3.0.0, where properties and property names were aligned for better inheritance. To maintain backward compatibility with scheduled serialized and stored prior to 3.0, we need to correctly map the old property names.

Method of the class: ActionScheduler_Abstract_RecurringSchedule{}

No Hooks.

Return

null. Nothing (null).

Usage

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

ActionScheduler_Abstract_RecurringSchedule::__wakeup() code WC 8.7.0

public function __wakeup() {
	parent::__wakeup();
	if ( $this->first_timestamp > 0 ) {
		$this->first_date = as_get_datetime_object( $this->first_timestamp );
	} else {
		$this->first_date = $this->get_date();
	}
}