Automattic\WooCommerce\Admin\Features

Onboarding::profiler_needs_completion()public staticWC 1.0

Check if the profiler still needs to be completed.

{} Это метод класса: Onboarding{}

Хуков нет.

Возвращает

true|false.

Использование

$result = Onboarding::profiler_needs_completion();

Код Onboarding::profiler_needs_completion() WC 6.4.1

public static function profiler_needs_completion() {
	$onboarding_data = get_option( self::PROFILE_DATA_OPTION, array() );

	$is_completed = isset( $onboarding_data['completed'] ) && true === $onboarding_data['completed'];
	$is_skipped   = isset( $onboarding_data['skipped'] ) && true === $onboarding_data['skipped'];

	// @todo When merging to WooCommerce Core, we should set the `completed` flag to true during the upgrade progress.
	// https://github.com/woocommerce/woocommerce-admin/pull/2300#discussion_r287237498.
	return ! $is_completed && ! $is_skipped;
}