Automattic\WooCommerce\Admin\Features\OnboardingTasks

TaskList::get_viewable_tasks()publicWC 1.0

Get only visible tasks in list.

Method of the class: TaskList{}

No Hooks.

Return

Array.

Usage

$TaskList = new TaskList();
$TaskList->get_viewable_tasks();

TaskList::get_viewable_tasks() code WC 7.1.0

public function get_viewable_tasks() {
	return array_values(
		array_filter(
			$this->tasks,
			function( $task ) {
				return $task->can_view();
			}
		)
	);
}