Automattic\WooCommerce\Admin\Features\OnboardingTasks

Task::mark_actioned()publicWC 1.0

Mark a task as actioned. Used to verify an action has taken place in some tasks.

{} Это метод класса: Task{}

Хуков нет.

Возвращает

true|false.

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

$Task = new Task();
$Task->mark_actioned();

Код Task::mark_actioned() WC 6.4.1

public function mark_actioned() {
	$actioned = get_option( self::ACTIONED_OPTION, array() );

	$actioned[] = $this->get_id();
	$update     = update_option( self::ACTIONED_OPTION, array_unique( $actioned ) );

	if ( $update ) {
		$this->record_tracks_event( 'actioned_task', array( 'task_name' => $this->get_id() ) );
	}

	return $update;
}