WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Features

OnboardingTasks::set_active_task() public WC 1.0

Temporarily store the active task to persist across page loads when neccessary (such as publishing a product). Most tasks do not need to do this.

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

No Hooks.

Return

null. Nothing.

Usage

$result = OnboardingTasks::set_active_task();

Code of OnboardingTasks::set_active_task() WC 5.2.2

<?php
public static function set_active_task() {
	if ( isset( $_GET[ self::ACTIVE_TASK_TRANSIENT ] ) ) { // phpcs:ignore csrf ok.
		$task = sanitize_title_with_dashes( wp_unslash( $_GET[ self::ACTIVE_TASK_TRANSIENT ] ) ); // phpcs:ignore csrf ok.

		if ( self::check_task_completion( $task ) ) {
			return;
		}

		set_transient(
			self::ACTIVE_TASK_TRANSIENT,
			$task,
			DAY_IN_SECONDS
		);
	}
}