Skip to content

Commit 4acc030

Browse files
committed
Remove couponDeletion feature flag
1 parent f7c0db7 commit 4acc030

File tree

4 files changed

+5
-14
lines changed

4 files changed

+5
-14
lines changed

Experiments/Experiments/DefaultFeatureFlagService.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
1515
return buildConfig == .localDeveloper || buildConfig == .alpha
1616
case .splitViewInOrdersTab:
1717
return buildConfig == .localDeveloper || buildConfig == .alpha
18-
case .couponDeletion:
19-
return true
2018
case .updateOrderOptimistically:
2119
return buildConfig == .localDeveloper || buildConfig == .alpha
2220
case .shippingLabelsOnboardingM1:

Experiments/Experiments/FeatureFlag.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ public enum FeatureFlag: Int {
3030
///
3131
case splitViewInOrdersTab
3232

33-
/// Displays the option to delete coupons
34-
///
35-
case couponDeletion
36-
3733
/// Enable optimistic updates for orders
3834
///
3935
case updateOrderOptimistically

WooCommerce/Classes/ViewRelated/Coupons/CouponDetails/CouponDetails.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,11 @@ struct CouponDetails: View {
8686
])
8787
}
8888

89-
if viewModel.isDeletingEnabled {
90-
buttons.append(.destructive(Text(Localization.deleteCoupon), action: {
91-
ServiceLocator.analytics.track(.couponDetails, withProperties: ["action": "tapped_delete"])
92-
showingDeletionConfirmAlert = true
93-
}))
94-
}
89+
buttons.append(.destructive(Text(Localization.deleteCoupon), action: {
90+
ServiceLocator.analytics.track(.couponDetails, withProperties: ["action": "tapped_delete"])
91+
showingDeletionConfirmAlert = true
92+
}))
93+
9594

9695
buttons.append(.cancel())
9796

WooCommerce/Classes/ViewRelated/Coupons/CouponDetails/CouponDetailsViewModel.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ final class CouponDetailsViewModel: ObservableObject {
128128
private let currencySettings: CurrencySettings
129129

130130
let isEditingEnabled: Bool
131-
let isDeletingEnabled: Bool
132131

133132
// Closure to be triggered when the coupon is updated successfully
134133
let onUpdate: () -> Void
@@ -150,7 +149,6 @@ final class CouponDetailsViewModel: ObservableObject {
150149
self.onUpdate = onUpdate
151150

152151
isEditingEnabled = coupon.discountType != .other
153-
isDeletingEnabled = featureFlags.isFeatureFlagEnabled(.couponDeletion)
154152
populateDetails()
155153
}
156154

0 commit comments

Comments
 (0)