Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -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:
Expand Down
4 changes: 0 additions & 4 deletions Modules/Sources/Experiments/FeatureFlag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion WooCommerce/Classes/POS/Presentation/CartView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
28 changes: 9 additions & 19 deletions WooCommerce/Classes/POS/Presentation/ItemListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ struct ItemListView: View {
@State private var searchTask: Task<Void, Never>?
@State private var didFinishSearch = true

private var isCouponsFeatureEnabled: Bool {
ServiceLocator.featureFlagService.isFeatureFlagEnabled(.enableCouponsInPointOfSale)
}

private var isSearchProductsFeatureEnabled: Bool {
ServiceLocator.featureFlagService.isFeatureFlagEnabled(.searchProductsInPOS)
}
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -266,7 +260,6 @@ private extension ItemListView {
.transition(.opacity.combined(with: .move(edge: .trailing)))
} else {
createCouponButton
.renderedIf(isCouponsFeatureEnabled)

simulatedScanButton
.renderedIf(isBarcodeScanSimulatorEnabled && isBarcodeScani1FeatureEnabled)
Expand All @@ -279,7 +272,6 @@ private extension ItemListView {
}
} else {
createCouponButton
.renderedIf(isCouponsFeatureEnabled)
}
}
})
Expand All @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading