Automattic\WooCommerce\Admin\Features\OnboardingTasks

Task::is_visited()publicWC 1.0

Check if the task has been visited.

{} It's a method of the class: Task{}

No Hooks.

Return

true|false.

Usage

$Task = new Task();
$Task->is_visited();

Code of Task::is_visited() WC 6.8.2

public function is_visited() {
	$user_id       = get_current_user_id();
	$response      = WCAdminUser::get_user_data_field( $user_id, 'task_list_tracked_started_tasks' );
	$tracked_tasks = $response ? json_decode( $response, true ) : array();

	return isset( $tracked_tasks[ $this->get_id() ] ) && $tracked_tasks[ $this->get_id() ] > 0;
}