Skip to content

Commit 81f390c

Browse files
committed
remove enableCouponsInPointOfSale
1 parent 281f7f1 commit 81f390c

File tree

5 files changed

+12
-29
lines changed

5 files changed

+12
-29
lines changed

Modules/Sources/Experiments/DefaultFeatureFlagService.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
6969
return false
7070
case .pointOfSale:
7171
return buildConfig == .localDeveloper || buildConfig == .alpha
72-
case .enableCouponsInPointOfSale:
73-
return true
7472
case .googleAdsCampaignCreationOnWebView:
7573
return true
7674
case .backgroundTasks:

Modules/Sources/Experiments/FeatureFlag.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,6 @@ public enum FeatureFlag: Int {
153153
///
154154
case pointOfSale
155155

156-
/// Enables coupons in Point of Sale
157-
///
158-
case enableCouponsInPointOfSale
159-
160156
/// Enables Google ads campaign creation on web view
161157
///
162158
case googleAdsCampaignCreationOnWebView

WooCommerce/Classes/POS/Presentation/CartView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ struct CartView: View {
2626
@State private var shouldShowItemImages: Bool = false
2727

2828
private var shouldShowCoupons: Bool {
29-
ServiceLocator.featureFlagService.isFeatureFlagEnabled(.enableCouponsInPointOfSale) && posModel.cart.coupons.isNotEmpty
29+
posModel.cart.coupons.isNotEmpty
3030
}
3131

3232
var body: some View {

WooCommerce/Classes/POS/Presentation/ItemListView.swift

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ struct ItemListView: View {
5050
@State private var searchTask: Task<Void, Never>?
5151
@State private var didFinishSearch = true
5252

53-
private var isCouponsFeatureEnabled: Bool {
54-
ServiceLocator.featureFlagService.isFeatureFlagEnabled(.enableCouponsInPointOfSale)
55-
}
56-
5753
private var isSearchProductsFeatureEnabled: Bool {
5854
ServiceLocator.featureFlagService.isFeatureFlagEnabled(.searchProductsInPOS)
5955
}
@@ -114,9 +110,7 @@ struct ItemListView: View {
114110

115111
TabView(selection: $selectedItemListType) {
116112
itemListTabContent(.products(search: false))
117-
if isCouponsFeatureEnabled {
118-
itemListTabContent(.coupons(search: false))
119-
}
113+
itemListTabContent(.coupons(search: false))
120114
}
121115
.tabViewStyle(.page(indexDisplayMode: .never))
122116
.animation(.none, value: selectedItemListType)
@@ -266,7 +260,6 @@ private extension ItemListView {
266260
.transition(.opacity.combined(with: .move(edge: .trailing)))
267261
} else {
268262
createCouponButton
269-
.renderedIf(isCouponsFeatureEnabled)
270263

271264
simulatedScanButton
272265
.renderedIf(isBarcodeScanSimulatorEnabled && isBarcodeScani1FeatureEnabled)
@@ -279,7 +272,6 @@ private extension ItemListView {
279272
}
280273
} else {
281274
createCouponButton
282-
.renderedIf(isCouponsFeatureEnabled)
283275
}
284276
}
285277
})
@@ -306,17 +298,15 @@ private extension ItemListView {
306298
)
307299
]
308300

309-
if isCouponsFeatureEnabled {
310-
items.append(
311-
POSPageHeaderItem(
312-
title: Localization.couponsTitle,
313-
isSelected: selectedItemListType.isCoupons,
314-
action: {
315-
displayItemListType(.coupons(search: false))
316-
}
317-
)
301+
items.append(
302+
POSPageHeaderItem(
303+
title: Localization.couponsTitle,
304+
isSelected: selectedItemListType.isCoupons,
305+
action: {
306+
displayItemListType(.coupons(search: false))
307+
}
318308
)
319-
}
309+
)
320310

321311
return items
322312
}

WooCommerce/Classes/POS/Presentation/PointOfSaleDashboardView.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,8 @@ struct PointOfSaleDashboardView: View {
110110
}
111111
.task {
112112
await posModel.purchasableItemsController.loadItems(base: .root)
113-
if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.enableCouponsInPointOfSale) {
114-
await posModel.couponsController.loadItems(base: .root)
115-
}
113+
await posModel.couponsController.loadItems(base: .root)
114+
116115
if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.searchProductsInPOS),
117116
ServiceLocator.featureFlagService.isFeatureFlagEnabled(.searchProductsInPOSPt2PopularProducts) {
118117
await posModel.popularPurchasableItemsController.loadItems(base: .root)

0 commit comments

Comments
 (0)