WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
класс не описан

ActionScheduler_NullSchedule() WC 1.0

Class ActionScheduler_NullSchedule

Хуков нет.

Возвращает

Null. Ничего.

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

$ActionScheduler_NullSchedule = new ActionScheduler_NullSchedule();
// use class methods

Методы

  1. __construct( DateTime $date = null )
  2. __sleep()
  3. __wakeup()

Код ActionScheduler NullSchedule: woocommerce/packages/action-scheduler/classes/schedules/ActionScheduler_NullSchedule.php WC 4.3.1

<?php
class ActionScheduler_NullSchedule extends ActionScheduler_SimpleSchedule {

	/**
	 * Make the $date param optional and default to null.
	 *
	 * @param null $date The date & time to run the action.
	 */
	public function __construct( DateTime $date = null ) {
		$this->scheduled_date = null;
	}

	/**
	 * This schedule has no scheduled DateTime, so we need to override the parent __sleep()
	 * @return array
	 */
	public function __sleep() {
		return array();
	}

	public function __wakeup() {
		$this->scheduled_date = null;
	}
}