Automattic\WooCommerce\Internal\Admin\Notes

ScheduledUpdatesPromotion::enable_scheduled_updatespublicWC 1.0

Enable scheduled updates when the action is triggered.

Method of the class: ScheduledUpdatesPromotion{}

No Hooks.

Returns

null. Nothing (null).

Usage

$ScheduledUpdatesPromotion = new ScheduledUpdatesPromotion();
$ScheduledUpdatesPromotion->enable_scheduled_updates( $note ): void;
$note(Note) (required)
The note being actioned.

ScheduledUpdatesPromotion::enable_scheduled_updates() code WC 10.8.1

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' );
}