Automattic\WooCommerce\Admin\Features\OnboardingTasks

TaskLists::maybe_add_extended_tasks()public staticWC 1.0

Add default extended task lists.

{} Это метод класса: TaskLists{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$result = TaskLists::maybe_add_extended_tasks( $extended_tasks );
$extended_tasks(массив) (обязательный)
list of extended tasks.

Код TaskLists::maybe_add_extended_tasks() WC 6.4.1

public static function maybe_add_extended_tasks( $extended_tasks ) {
	$tasks = $extended_tasks ?? array();

	foreach ( self::$lists as $task_list ) {
		if ( 'extended' !== substr( $task_list->id, 0, 8 ) ) {
			continue;
		}
		foreach ( $tasks as $args ) {
			$task = new DeprecatedExtendedTask( $task_list, $args );
			$task_list->add_task( $task );
		}
	}

}