File tree Expand file tree Collapse file tree 4 files changed +5
-14
lines changed
WooCommerce/Classes/ViewRelated/Coupons/CouponDetails Expand file tree Collapse file tree 4 files changed +5
-14
lines changed Original file line number Diff line number Diff 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:
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments