Automattic\WooCommerce\Internal\Admin\Onboarding

OnboardingProfile::needs_completion()public staticWC 1.0

Check if the profiler still needs to be completed.

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

No Hooks.

Return

true|false.

Usage

$result = OnboardingProfile::needs_completion();

Code of OnboardingProfile::needs_completion() WC 7.1.0

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;
}