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.

Method of the class: Task{}

No Hooks.

Return

true|false.

Usage

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

Task::mark_actioned() code WC 8.7.0

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