has_sdk = $has_sdk ?? static fn (): bool => function_exists( 'adaf_fs' ); } /** * Hook registration. After AdminPage's default priority, so the parent * menu exists. */ public function register(): void { add_action( 'admin_menu', array( $this, 'register_menu' ), 20 ); } /** * Add the Upgrade item, unless Freemius provides its own. */ public function register_menu(): void { if ( ( $this->has_sdk )() ) { return; } // Last, after the sections (AdminPage, default priority): the first // of them is the parent's own page, so the top-level link stays home. $upgrade = __( 'Upgrade', 'agentic-daisy-ai-agent-firewall' ); add_submenu_page( AdminPage::SLUG, $upgrade, $upgrade, 'manage_options', self::PRICING_URL ); } }