Automattic\WooCommerce\Admin\Features\OnboardingTasks

TaskList::get_task()publicWC 1.0

Get only visible tasks in list.

Method of the class: TaskList{}

No Hooks.

Return

Task.

Usage

$TaskList = new TaskList();
$TaskList->get_task( $task_id );
$task_id(string) (required)
id of task.

TaskList::get_task() code WC 8.7.0

public function get_task( $task_id ) {
	return current(
		array_filter(
			$this->tasks,
			function( $task ) use ( $task_id ) {
				return $task->get_id() === $task_id;
			}
		)
	);
}