Automattic\WooCommerce\Internal\Admin\Onboarding
OnboardingProfile::needs_completion
Check if the profiler still needs to be completed.
Method of the class: OnboardingProfile{}
No Hooks.
Returns
true|false.
Usage
$result = OnboardingProfile::needs_completion();
OnboardingProfile::needs_completion() OnboardingProfile::needs completion code WC 10.7.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;
}