Automattic\WooCommerce\Admin\Features\OnboardingTasks

TaskListSection::get_json()publicWC 1.0

Get the list for use in JSON.

Метод класса: TaskListSection{}

No Hooks.

Return

Array.

Usage

$TaskListSection = new TaskListSection();
$TaskListSection->get_json();

Код TaskListSection::get_json() WC 7.1.0

public function get_json() {
	return array(
		'id'          => $this->id,
		'title'       => $this->title,
		'description' => $this->description,
		'image'       => $this->image,
		'tasks'       => array_map(
			function( $task_name ) {
				if ( null !== $this->task_list && isset( $this->task_list->task_class_id_map[ $task_name ] ) ) {
					return $this->task_list->task_class_id_map[ $task_name ];
				}
				return '';
			},
			$this->task_names
		),
		'isComplete'  => $this->is_complete(),
	);
}