diff --git a/Modules/Sources/Experiments/DefaultFeatureFlagService.swift b/Modules/Sources/Experiments/DefaultFeatureFlagService.swift index 4fd0c574ec8..1ea9713a6d8 100644 --- a/Modules/Sources/Experiments/DefaultFeatureFlagService.swift +++ b/Modules/Sources/Experiments/DefaultFeatureFlagService.swift @@ -69,8 +69,6 @@ public struct DefaultFeatureFlagService: FeatureFlagService { return false case .pointOfSale: return buildConfig == .localDeveloper || buildConfig == .alpha - case .enableCouponsInPointOfSale: - return true case .googleAdsCampaignCreationOnWebView: return true case .backgroundTasks: diff --git a/Modules/Sources/Experiments/FeatureFlag.swift b/Modules/Sources/Experiments/FeatureFlag.swift index 75cc31ff55b..ebf7b10f480 100644 --- a/Modules/Sources/Experiments/FeatureFlag.swift +++ b/Modules/Sources/Experiments/FeatureFlag.swift @@ -153,10 +153,6 @@ public enum FeatureFlag: Int { /// case pointOfSale - /// Enables coupons in Point of Sale - /// - case enableCouponsInPointOfSale - /// Enables Google ads campaign creation on web view /// case googleAdsCampaignCreationOnWebView diff --git a/WooCommerce/Classes/POS/Presentation/CartView.swift b/WooCommerce/Classes/POS/Presentation/CartView.swift index 8e3cfe4d545..ec72321a1f7 100644 --- a/WooCommerce/Classes/POS/Presentation/CartView.swift +++ b/WooCommerce/Classes/POS/Presentation/CartView.swift @@ -26,7 +26,7 @@ struct CartView: View { @State private var shouldShowItemImages: Bool = false private var shouldShowCoupons: Bool { - ServiceLocator.featureFlagService.isFeatureFlagEnabled(.enableCouponsInPointOfSale) && posModel.cart.coupons.isNotEmpty + posModel.cart.coupons.isNotEmpty } var body: some View { diff --git a/WooCommerce/Classes/POS/Presentation/ItemListView.swift b/WooCommerce/Classes/POS/Presentation/ItemListView.swift index ba5d70f0e95..089ef3d2ffc 100644 --- a/WooCommerce/Classes/POS/Presentation/ItemListView.swift +++ b/WooCommerce/Classes/POS/Presentation/ItemListView.swift @@ -50,10 +50,6 @@ struct ItemListView: View { @State private var searchTask: Task? @State private var didFinishSearch = true - private var isCouponsFeatureEnabled: Bool { - ServiceLocator.featureFlagService.isFeatureFlagEnabled(.enableCouponsInPointOfSale) - } - private var isSearchProductsFeatureEnabled: Bool { ServiceLocator.featureFlagService.isFeatureFlagEnabled(.searchProductsInPOS) } @@ -114,9 +110,7 @@ struct ItemListView: View { TabView(selection: $selectedItemListType) { itemListTabContent(.products(search: false)) - if isCouponsFeatureEnabled { - itemListTabContent(.coupons(search: false)) - } + itemListTabContent(.coupons(search: false)) } .tabViewStyle(.page(indexDisplayMode: .never)) .animation(.none, value: selectedItemListType) @@ -266,7 +260,6 @@ private extension ItemListView { .transition(.opacity.combined(with: .move(edge: .trailing))) } else { createCouponButton - .renderedIf(isCouponsFeatureEnabled) simulatedScanButton .renderedIf(isBarcodeScanSimulatorEnabled && isBarcodeScani1FeatureEnabled) @@ -279,7 +272,6 @@ private extension ItemListView { } } else { createCouponButton - .renderedIf(isCouponsFeatureEnabled) } } }) @@ -306,17 +298,15 @@ private extension ItemListView { ) ] - if isCouponsFeatureEnabled { - items.append( - POSPageHeaderItem( - title: Localization.couponsTitle, - isSelected: selectedItemListType.isCoupons, - action: { - displayItemListType(.coupons(search: false)) - } - ) + items.append( + POSPageHeaderItem( + title: Localization.couponsTitle, + isSelected: selectedItemListType.isCoupons, + action: { + displayItemListType(.coupons(search: false)) + } ) - } + ) return items } diff --git a/WooCommerce/Classes/POS/Presentation/PointOfSaleDashboardView.swift b/WooCommerce/Classes/POS/Presentation/PointOfSaleDashboardView.swift index 0b6c5f7f273..2bfffc0b67c 100644 --- a/WooCommerce/Classes/POS/Presentation/PointOfSaleDashboardView.swift +++ b/WooCommerce/Classes/POS/Presentation/PointOfSaleDashboardView.swift @@ -110,9 +110,8 @@ struct PointOfSaleDashboardView: View { } .task { await posModel.purchasableItemsController.loadItems(base: .root) - if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.enableCouponsInPointOfSale) { - await posModel.couponsController.loadItems(base: .root) - } + await posModel.couponsController.loadItems(base: .root) + if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.searchProductsInPOS), ServiceLocator.featureFlagService.isFeatureFlagEnabled(.searchProductsInPOSPt2PopularProducts) { await posModel.popularPurchasableItemsController.loadItems(base: .root)