Automattic\WooCommerce\Admin\Features\OnboardingTasks
Task::get_json()
Get the task as JSON.
Method of the class: Task{}
No Hooks.
Return
Array
.
Usage
$Task = new Task(); $Task->get_json();
Task::get_json() Task::get json code WC 9.7.1
public function get_json() { $this->possibly_track_completion(); return array( 'id' => $this->get_id(), 'parentId' => $this->get_parent_id(), 'title' => $this->get_title(), 'badge' => $this->get_badge(), 'canView' => $this->can_view(), 'content' => $this->get_content(), 'additionalInfo' => $this->get_additional_info(), 'actionLabel' => $this->get_action_label(), 'actionUrl' => $this->get_action_url(), 'isComplete' => $this->is_complete(), 'time' => $this->get_time(), 'level' => 3, 'isActioned' => $this->is_actioned(), 'isDismissed' => $this->is_dismissed(), 'isDismissable' => $this->is_dismissable(), 'isSnoozed' => false, 'isSnoozeable' => false, 'isVisited' => $this->is_visited(), 'isDisabled' => false, 'snoozedUntil' => null, 'additionalData' => self::convert_object_to_camelcase( $this->get_additional_data() ), 'eventPrefix' => $this->prefix_event( '' ), 'recordViewEvent' => $this->get_record_view_event(), ); }