Automattic\WooCommerce\Admin\Features\OnboardingTasks
TaskList::get_task
Get only visible tasks in list.
Method of the class: TaskList{}
No Hooks.
Returns
Task.
Usage
$TaskList = new TaskList(); $TaskList->get_task( $task_id );
- $task_id(string) (required)
- id of task.
TaskList::get_task() TaskList::get task code WC 10.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;
}
)
);
}