Automattic\WooCommerce\Internal\Admin\Onboarding

OnboardingProfile::needs_completion()public staticWC 1.0

Check if the profiler still needs to be completed.

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

Хуков нет.

Возвращает

true|false.

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

$result = OnboardingProfile::needs_completion();

Код OnboardingProfile::needs_completion() WC 6.6.1

public static function needs_completion() {
	$onboarding_data = get_option( self::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;
}