diff --git a/DuckDuckGo/NavigationBar/View/MoreOptionsMenu.swift b/DuckDuckGo/NavigationBar/View/MoreOptionsMenu.swift index cd80f9fff1..3ae0a5ab01 100644 --- a/DuckDuckGo/NavigationBar/View/MoreOptionsMenu.swift +++ b/DuckDuckGo/NavigationBar/View/MoreOptionsMenu.swift @@ -337,8 +337,6 @@ final class MoreOptionsMenu: NSMenu { var items: [NSMenuItem] = [] #if SUBSCRIPTION - - let subscriptionFeatureAvailability = DefaultSubscriptionFeatureAvailability() #endif @@ -437,6 +435,11 @@ final class MoreOptionsMenu: NSMenu { #if SUBSCRIPTION private func makeInactiveSubscriptionItems() -> [NSMenuItem] { + switch (SubscriptionPurchaseEnvironment.current, SubscriptionPurchaseEnvironment.canPurchase) { + case (.appStore, false): return [] + default: break + } + let privacyProItem = NSMenuItem(title: UserText.subscriptionOptionsMenuItem, action: #selector(openSubscriptionPurchasePage(_:)), keyEquivalent: "") diff --git a/DuckDuckGo/Preferences/Model/PreferencesSection.swift b/DuckDuckGo/Preferences/Model/PreferencesSection.swift index 9274a723dd..81b9739aae 100644 --- a/DuckDuckGo/Preferences/Model/PreferencesSection.swift +++ b/DuckDuckGo/Preferences/Model/PreferencesSection.swift @@ -61,8 +61,12 @@ struct PreferencesSection: Hashable, Identifiable { #if SUBSCRIPTION if DefaultSubscriptionFeatureAvailability().isFeatureAvailable { - let subscriptionPanes: [PreferencePaneIdentifier] = [.subscription] - sections.insert(.init(id: .privacyPro, panes: subscriptionPanes), at: 1) + switch (SubscriptionPurchaseEnvironment.current, SubscriptionPurchaseEnvironment.canPurchase) { + case (.appStore, false): break + default: + let subscriptionPanes: [PreferencePaneIdentifier] = [.subscription] + sections.insert(.init(id: .privacyPro, panes: subscriptionPanes), at: 1) + } } #endif