get_component( 'Api_Controller' )->get_endpoint( 'onboarding-settings' ); $kits = $onboarding_rest->get_kits(); $kit = array_filter( $kits, function ( $k ) use ( $kit_name ) { return $k['manifest']['name'] === $kit_name; } ); $is_setup_wizard_completed = ! empty( $kit ); } catch ( \Exception $e ) { $is_setup_wizard_completed = false; } return $is_setup_wizard_completed; } public function register_setup_wizard_page( $parent_slug ): void { add_submenu_page( $parent_slug, __( 'Setup Wizard', 'hello-plus' ), __( 'Setup Wizard', 'hello-plus' ), 'manage_options', self::SETUP_WIZARD_PAGE_SLUG, [ $this, 'render_setup_wizard_page' ] ); } public function render_setup_wizard_page(): void { echo '
'; } }