Skip to content

Remove IAP as experimental feature flag option #15799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 24, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Modules/Sources/Experiments/DefaultFeatureFlagService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
return buildConfig == .localDeveloper || buildConfig == .alpha
case .searchProductsBySKU:
return true
case .inAppPurchasesDebugMenu:
return buildConfig == .localDeveloper || buildConfig == .alpha
case .performanceMonitoring,
.performanceMonitoringCoreData,
.performanceMonitoringFileIO,
Expand Down
5 changes: 0 additions & 5 deletions Modules/Sources/Experiments/FeatureFlag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ public enum FeatureFlag: Int {
///
case searchProductsBySKU

/// Makes the Experimental Feature toggle for the Debug In-app purchases menu visible.
/// This should not be turned on in production builds. This doesn't make any difference to the availabliity of plan purchases via IAP.
///
case inAppPurchasesDebugMenu

/// Enables Tap to Pay on iPhone flow in In-Person Payments, on eligible devices.
/// This flag needs to be retained, as we cannot enable TTPoI on the Enterprise certificate,
/// so `.alpha` builds must be excluded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ extension Storage.GeneralAppSettings {
installationDate: NullableCopiableProp<Date> = .copy,
feedbacks: CopiableProp<[FeedbackType: FeedbackSettings]> = .copy,
isViewAddOnsSwitchEnabled: CopiableProp<Bool> = .copy,
isInAppPurchasesSwitchEnabled: CopiableProp<Bool> = .copy,
knownCardReaders: CopiableProp<[String]> = .copy,
lastEligibilityErrorInfo: NullableCopiableProp<EligibilityErrorInfo> = .copy,
lastJetpackBenefitsBannerDismissedTime: NullableCopiableProp<Date> = .copy,
Expand All @@ -69,7 +68,6 @@ extension Storage.GeneralAppSettings {
let installationDate = installationDate ?? self.installationDate
let feedbacks = feedbacks ?? self.feedbacks
let isViewAddOnsSwitchEnabled = isViewAddOnsSwitchEnabled ?? self.isViewAddOnsSwitchEnabled
let isInAppPurchasesSwitchEnabled = isInAppPurchasesSwitchEnabled ?? self.isInAppPurchasesSwitchEnabled
let knownCardReaders = knownCardReaders ?? self.knownCardReaders
let lastEligibilityErrorInfo = lastEligibilityErrorInfo ?? self.lastEligibilityErrorInfo
let lastJetpackBenefitsBannerDismissedTime = lastJetpackBenefitsBannerDismissedTime ?? self.lastJetpackBenefitsBannerDismissedTime
Expand All @@ -82,7 +80,6 @@ extension Storage.GeneralAppSettings {
installationDate: installationDate,
feedbacks: feedbacks,
isViewAddOnsSwitchEnabled: isViewAddOnsSwitchEnabled,
isInAppPurchasesSwitchEnabled: isInAppPurchasesSwitchEnabled,
knownCardReaders: knownCardReaders,
lastEligibilityErrorInfo: lastEligibilityErrorInfo,
lastJetpackBenefitsBannerDismissedTime: lastJetpackBenefitsBannerDismissedTime,
Expand Down
10 changes: 0 additions & 10 deletions Modules/Sources/Storage/Model/GeneralAppSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
///
public var isViewAddOnsSwitchEnabled: Bool

/// The state for the In-app Purchases feature switch.
///
public var isInAppPurchasesSwitchEnabled: Bool

/// A list (possibly empty) of known card reader IDs - i.e. IDs of card readers that should be reconnected to automatically
/// e.g. ["CHB204909005931"]
///
Expand Down Expand Up @@ -59,7 +55,6 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
public init(installationDate: Date?,
feedbacks: [FeedbackType: FeedbackSettings],
isViewAddOnsSwitchEnabled: Bool,
isInAppPurchasesSwitchEnabled: Bool,
knownCardReaders: [String],
lastEligibilityErrorInfo: EligibilityErrorInfo? = nil,
lastJetpackBenefitsBannerDismissedTime: Date? = nil,
Expand All @@ -74,7 +69,6 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
self.lastEligibilityErrorInfo = lastEligibilityErrorInfo
self.lastJetpackBenefitsBannerDismissedTime = lastJetpackBenefitsBannerDismissedTime
self.featureAnnouncementCampaignSettings = featureAnnouncementCampaignSettings
self.isInAppPurchasesSwitchEnabled = isInAppPurchasesSwitchEnabled
self.sitesWithAtLeastOneIPPTransactionFinished = sitesWithAtLeastOneIPPTransactionFinished
self.isEUShippingNoticeDismissed = isEUShippingNoticeDismissed
self.isCustomFieldsTopBannerDismissed = isCustomFieldsTopBannerDismissed
Expand All @@ -84,7 +78,6 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
.init(installationDate: nil,
feedbacks: [:],
isViewAddOnsSwitchEnabled: false,
isInAppPurchasesSwitchEnabled: false,
knownCardReaders: [],
lastEligibilityErrorInfo: nil,
featureAnnouncementCampaignSettings: [:],
Expand Down Expand Up @@ -114,7 +107,6 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
installationDate: installationDate,
feedbacks: updatedFeedbacks,
isViewAddOnsSwitchEnabled: isViewAddOnsSwitchEnabled,
isInAppPurchasesSwitchEnabled: isInAppPurchasesSwitchEnabled,
knownCardReaders: knownCardReaders,
lastEligibilityErrorInfo: lastEligibilityErrorInfo,
featureAnnouncementCampaignSettings: featureAnnouncementCampaignSettings,
Expand All @@ -135,7 +127,6 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
installationDate: installationDate,
feedbacks: feedbacks,
isViewAddOnsSwitchEnabled: isViewAddOnsSwitchEnabled,
isInAppPurchasesSwitchEnabled: isInAppPurchasesSwitchEnabled,
knownCardReaders: knownCardReaders,
lastEligibilityErrorInfo: lastEligibilityErrorInfo,
featureAnnouncementCampaignSettings: updatedSettings,
Expand All @@ -156,7 +147,6 @@ extension GeneralAppSettings {
self.installationDate = try container.decodeIfPresent(Date.self, forKey: .installationDate)
self.feedbacks = try container.decodeIfPresent([FeedbackType: FeedbackSettings].self, forKey: .feedbacks) ?? [:]
self.isViewAddOnsSwitchEnabled = try container.decodeIfPresent(Bool.self, forKey: .isViewAddOnsSwitchEnabled) ?? false
self.isInAppPurchasesSwitchEnabled = try container.decodeIfPresent(Bool.self, forKey: .isInAppPurchasesSwitchEnabled) ?? false
self.knownCardReaders = try container.decodeIfPresent([String].self, forKey: .knownCardReaders) ?? []
self.lastEligibilityErrorInfo = try container.decodeIfPresent(EligibilityErrorInfo.self, forKey: .lastEligibilityErrorInfo)
self.lastJetpackBenefitsBannerDismissedTime = try container.decodeIfPresent(Date.self, forKey: .lastJetpackBenefitsBannerDismissedTime)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ final class GeneralAppSettingsTests: XCTestCase {
let previousSettings = GeneralAppSettings(installationDate: installationDate,
feedbacks: feedbackSettings,
isViewAddOnsSwitchEnabled: true,
isInAppPurchasesSwitchEnabled: false,
knownCardReaders: readers,
lastEligibilityErrorInfo: eligibilityInfo,
lastJetpackBenefitsBannerDismissedTime: jetpackBannerDismissedDate,
Expand Down Expand Up @@ -103,7 +102,6 @@ private extension GeneralAppSettingsTests {
func createGeneralAppSettings(installationDate: Date? = nil,
feedbacks: [FeedbackType: FeedbackSettings] = [:],
isViewAddOnsSwitchEnabled: Bool = false,
isInAppPurchasesSwitchEnabled: Bool = false,
isSwiftUIPaymentsMenuSwitchEnabled: Bool = false,
knownCardReaders: [String] = [],
lastEligibilityErrorInfo: EligibilityErrorInfo? = nil,
Expand All @@ -116,7 +114,6 @@ private extension GeneralAppSettingsTests {
GeneralAppSettings(installationDate: installationDate,
feedbacks: feedbacks,
isViewAddOnsSwitchEnabled: isViewAddOnsSwitchEnabled,
isInAppPurchasesSwitchEnabled: isInAppPurchasesSwitchEnabled,
knownCardReaders: knownCardReaders,
lastEligibilityErrorInfo: lastEligibilityErrorInfo,
lastJetpackBenefitsBannerDismissedTime: lastJetpackBenefitsBannerDismissedTime,
Expand Down
16 changes: 0 additions & 16 deletions WooCommerce/Classes/Model/BetaFeature.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,27 @@ import protocol WooFoundation.WooAnalyticsEventPropertyType

enum BetaFeature: String, CaseIterable {
case viewAddOns
case inAppPurchases
}

extension BetaFeature {
var title: String {
switch self {
case .viewAddOns:
return Localization.viewAddOnsTitle
case .inAppPurchases:
return Localization.inAppPurchasesManagementTitle
}
}

var description: String {
switch self {
case .viewAddOns:
return Localization.viewAddOnsDescription
case .inAppPurchases:
return Localization.inAppPurchasesManagementDescription
}
}

var settingsKey: WritableKeyPath<GeneralAppSettings, Bool> {
switch self {
case .viewAddOns:
return \.isViewAddOnsSwitchEnabled
case .inAppPurchases:
return \.isInAppPurchasesSwitchEnabled
}
}

Expand All @@ -42,8 +35,6 @@ extension BetaFeature {
switch self {
case .viewAddOns:
return .settingsBetaFeaturesOrderAddOnsToggled
default:
return .settingsBetaFeatureToggled
}
}

Expand Down Expand Up @@ -95,12 +86,5 @@ private extension BetaFeature {
static let viewAddOnsDescription = NSLocalizedString(
"Test out viewing Order Add-Ons as we get ready to launch",
comment: "Cell description on the beta features screen to enable the order add-ons feature")

static let inAppPurchasesManagementTitle = NSLocalizedString(
"In-app purchases",
comment: "Cell title on beta features screen to enable in-app purchases")
static let inAppPurchasesManagementDescription = NSLocalizedString(
"Test out in-app purchases as we get ready to launch",
comment: "Cell description on beta features screen to enable in-app purchases")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ final class BetaFeaturesConfigurationViewModel: ObservableObject {
switch betaFeature {
case .viewAddOns:
return true
case .inAppPurchases:
return featureFlagService.isFeatureFlagEnabled(.inAppPurchasesDebugMenu)
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions WooCommerce/Classes/ViewRelated/Hub Menu/HubMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,6 @@ private extension HubMenu {
.navigationTitle(Localization.reviews)
case .coupons:
couponListView
case .inAppPurchase:
InAppPurchasesDebugView()
case .subscriptions:
SubscriptionsView(viewModel: .init())
case .customers:
Expand Down
18 changes: 0 additions & 18 deletions WooCommerce/Classes/ViewRelated/Hub Menu/HubMenuViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ enum HubMenuNavigationDestination: Hashable {
case inbox
case reviews
case coupons
case inAppPurchase
case subscriptions
case customers
case reviewDetails(parcel: ProductReviewFromNoteParcel)
Expand Down Expand Up @@ -389,10 +388,6 @@ private extension HubMenuViewModel {
items.append(Inbox())
}

if generalAppSettings.betaFeatureEnabled(.inAppPurchases) {
items.append(InAppPurchases())
}

items.append(Customers())

return items
Expand Down Expand Up @@ -699,19 +694,6 @@ extension HubMenuViewModel {
let navigationDestination: HubMenuNavigationDestination? = .reviews
}

struct InAppPurchases: HubMenuItem {
static var id = "iap"

let title: String = "[Debug] IAP"
let description: String = "Debug your inApp Purchases"
let icon: UIImage = UIImage(systemName: "ladybug.fill")!
let iconColor: UIColor = .red
let accessibilityIdentifier: String = "menu-iap"
let trackingOption: String = "debug-iap"
let iconBadge: HubMenuBadgeType? = nil
let navigationDestination: HubMenuNavigationDestination? = .inAppPurchase
}

struct PointOfSaleEntryPoint: HubMenuItem {
static var id = "pointOfSale"

Expand Down
Loading