WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Features

OnboardingTasks::track_task_completion() public WC 1.0

Records an event for individual task completion.

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

No Hooks.

Return

null. Nothing.

Usage

$result = OnboardingTasks::track_task_completion( $old_value, $new_value );
$old_value(mixed) (required)
Old value.
$new_value(mixed) (required)
New value.

Code of OnboardingTasks::track_task_completion() WC 5.3.0

<?php
public static function track_task_completion( $old_value, $new_value ) {
	$old_value       = is_array( $old_value ) ? $old_value : array();
	$untracked_tasks = array_diff( $new_value, $old_value );

	foreach ( $untracked_tasks as $task ) {
		wc_admin_record_tracks_event( 'tasklist_task_completed', array( 'task_name' => $task ) );
	}
}