Automattic\WooCommerce\Internal\Admin\Notes

ScheduledUpdatesPromotion::enable_scheduled_updatespublicWC 1.0

Enable scheduled updates when the action is triggered.

Метод класса: ScheduledUpdatesPromotion{}

Хуков нет.

Возвращает

null. Ничего (null).

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

$ScheduledUpdatesPromotion = new ScheduledUpdatesPromotion();
$ScheduledUpdatesPromotion->enable_scheduled_updates( $note ): void;
$note(Note) (обязательный)
The note being actioned.

Код ScheduledUpdatesPromotion::enable_scheduled_updates() WC 10.5.2

public function enable_scheduled_updates( $note ): void {
	// Verify this is our note.
	if ( self::NOTE_NAME !== $note->get_name() ) {
		return;
	}

	// Update the option to enable scheduled mode.
	update_option( self::OPTION_NAME, 'yes' );
}