Automattic\WooCommerce\Admin\Features\OnboardingTasks
TaskListSection::get_json()
Get the list for use in JSON.
Метод класса: TaskListSection{}
Хуков нет.
Возвращает
Массив
.
Использование
$TaskListSection = new TaskListSection(); $TaskListSection->get_json();
Код TaskListSection::get_json() TaskListSection::get json WC 9.2.3
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(), ); }