Automattic\WooCommerce\Admin\Features\OnboardingTasks

TaskList::get_task()publicWC 1.0

Get only visible tasks in list.

{} It's a 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.

Code of TaskList::get_task() WC 6.6.1

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