Skip to content

Commit 3a68213

Browse files
authored
Merge pull request #6205 from woocommerce/issue/6204-remove-stripe-ipp-from-experimental
[Mobile Payments] Remove stripe IPP from experiments; always true now
2 parents a03c402 + b1ebb31 commit 3a68213

File tree

19 files changed

+37
-274
lines changed

19 files changed

+37
-274
lines changed

Experiments/Experiments/DefaultFeatureFlagService.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
3131
return true
3232
case .systemStatusReport:
3333
return true
34-
case .stripeExtensionInPersonPayments:
35-
return buildConfig == .localDeveloper || buildConfig == .alpha
3634
case .myStoreTabUpdates:
3735
return true
3836
case .couponView:

Experiments/Experiments/FeatureFlag.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ public enum FeatureFlag: Int {
6262
///
6363
case systemStatusReport
6464

65-
/// Allows sites using the WooCommerce Stripe Payment Gateway extension to accept In-Person Payments
66-
///
67-
case stripeExtensionInPersonPayments
68-
6965
/// Home Screen project milestone 2: design updates to the My Store tab
7066
///
7167
case myStoreTabUpdates

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- [*] Orders: In the experimental Order Creation feature, product variations added to a new order now show a list of their attributes. [https://github.com/woocommerce/woocommerce-ios/pull/6131]
77
- [*] Enlarged the tap area for the action button on the notice view. [https://github.com/woocommerce/woocommerce-ios/pull/6146]
88
- [*] Reviews: Fixed crash on iPad when tapping the More button. [https://github.com/woocommerce/woocommerce-ios/pull/6187]
9+
- [*] In-Person Payments: Remove Stripe from Experimental Features as it is always enabled now. [https://github.com/woocommerce/woocommerce-ios/pull/6205]
910
- [*] Disabled unneccesary selection of the "Refund via" row on the Refund Confirmation screen [https://github.com/woocommerce/woocommerce-ios/pull/6198]
1011

1112
8.5

Storage/Storage/Model/Copiable/Models+Copiable.generated.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ extension GeneralAppSettings {
1010
feedbacks: CopiableProp<[FeedbackType: FeedbackSettings]> = .copy,
1111
isViewAddOnsSwitchEnabled: CopiableProp<Bool> = .copy,
1212
isOrderCreationSwitchEnabled: CopiableProp<Bool> = .copy,
13-
isStripeInPersonPaymentsSwitchEnabled: CopiableProp<Bool> = .copy,
1413
isCanadaInPersonPaymentsSwitchEnabled: CopiableProp<Bool> = .copy,
1514
isProductSKUInputScannerSwitchEnabled: CopiableProp<Bool> = .copy,
1615
isCouponManagementSwitchEnabled: CopiableProp<Bool> = .copy,
@@ -22,7 +21,6 @@ extension GeneralAppSettings {
2221
let feedbacks = feedbacks ?? self.feedbacks
2322
let isViewAddOnsSwitchEnabled = isViewAddOnsSwitchEnabled ?? self.isViewAddOnsSwitchEnabled
2423
let isOrderCreationSwitchEnabled = isOrderCreationSwitchEnabled ?? self.isOrderCreationSwitchEnabled
25-
let isStripeInPersonPaymentsSwitchEnabled = isStripeInPersonPaymentsSwitchEnabled ?? self.isStripeInPersonPaymentsSwitchEnabled
2624
let isCanadaInPersonPaymentsSwitchEnabled = isCanadaInPersonPaymentsSwitchEnabled ?? self.isCanadaInPersonPaymentsSwitchEnabled
2725
let isProductSKUInputScannerSwitchEnabled = isProductSKUInputScannerSwitchEnabled ?? self.isProductSKUInputScannerSwitchEnabled
2826
let isCouponManagementSwitchEnabled = isCouponManagementSwitchEnabled ?? self.isCouponManagementSwitchEnabled
@@ -35,7 +33,6 @@ extension GeneralAppSettings {
3533
feedbacks: feedbacks,
3634
isViewAddOnsSwitchEnabled: isViewAddOnsSwitchEnabled,
3735
isOrderCreationSwitchEnabled: isOrderCreationSwitchEnabled,
38-
isStripeInPersonPaymentsSwitchEnabled: isStripeInPersonPaymentsSwitchEnabled,
3936
isCanadaInPersonPaymentsSwitchEnabled: isCanadaInPersonPaymentsSwitchEnabled,
4037
isProductSKUInputScannerSwitchEnabled: isProductSKUInputScannerSwitchEnabled,
4138
isCouponManagementSwitchEnabled: isCouponManagementSwitchEnabled,

Storage/Storage/Model/GeneralAppSettings.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
2828
///
2929
public let isOrderCreationSwitchEnabled: Bool
3030

31-
/// The state for the Stripe Gateway Extension IPP feature switch
32-
///
33-
public let isStripeInPersonPaymentsSwitchEnabled: Bool
34-
3531
/// The state for the In-Person Payments in Canada feature switch
3632
///
3733
public let isCanadaInPersonPaymentsSwitchEnabled: Bool
@@ -60,7 +56,6 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
6056
feedbacks: [FeedbackType: FeedbackSettings],
6157
isViewAddOnsSwitchEnabled: Bool,
6258
isOrderCreationSwitchEnabled: Bool,
63-
isStripeInPersonPaymentsSwitchEnabled: Bool,
6459
isCanadaInPersonPaymentsSwitchEnabled: Bool,
6560
isProductSKUInputScannerSwitchEnabled: Bool,
6661
isCouponManagementSwitchEnabled: Bool,
@@ -71,7 +66,6 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
7166
self.feedbacks = feedbacks
7267
self.isViewAddOnsSwitchEnabled = isViewAddOnsSwitchEnabled
7368
self.isOrderCreationSwitchEnabled = isOrderCreationSwitchEnabled
74-
self.isStripeInPersonPaymentsSwitchEnabled = isStripeInPersonPaymentsSwitchEnabled
7569
self.isCanadaInPersonPaymentsSwitchEnabled = isCanadaInPersonPaymentsSwitchEnabled
7670
self.isProductSKUInputScannerSwitchEnabled = isProductSKUInputScannerSwitchEnabled
7771
self.isCouponManagementSwitchEnabled = isCouponManagementSwitchEnabled
@@ -102,7 +96,6 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
10296
feedbacks: updatedFeedbacks,
10397
isViewAddOnsSwitchEnabled: isViewAddOnsSwitchEnabled,
10498
isOrderCreationSwitchEnabled: isOrderCreationSwitchEnabled,
105-
isStripeInPersonPaymentsSwitchEnabled: isStripeInPersonPaymentsSwitchEnabled,
10699
isCanadaInPersonPaymentsSwitchEnabled: isCanadaInPersonPaymentsSwitchEnabled,
107100
isProductSKUInputScannerSwitchEnabled: isProductSKUInputScannerSwitchEnabled,
108101
isCouponManagementSwitchEnabled: isCouponManagementSwitchEnabled,
@@ -123,7 +116,6 @@ extension GeneralAppSettings {
123116
self.feedbacks = try container.decodeIfPresent([FeedbackType: FeedbackSettings].self, forKey: .feedbacks) ?? [:]
124117
self.isViewAddOnsSwitchEnabled = try container.decodeIfPresent(Bool.self, forKey: .isViewAddOnsSwitchEnabled) ?? false
125118
self.isOrderCreationSwitchEnabled = try container.decodeIfPresent(Bool.self, forKey: .isOrderCreationSwitchEnabled) ?? false
126-
self.isStripeInPersonPaymentsSwitchEnabled = try container.decodeIfPresent(Bool.self, forKey: .isStripeInPersonPaymentsSwitchEnabled) ?? false
127119
self.isCanadaInPersonPaymentsSwitchEnabled = try container.decodeIfPresent(Bool.self, forKey: .isCanadaInPersonPaymentsSwitchEnabled) ?? false
128120
self.isProductSKUInputScannerSwitchEnabled = try container.decodeIfPresent(Bool.self, forKey: .isProductSKUInputScannerSwitchEnabled) ?? false
129121
self.isCouponManagementSwitchEnabled = try container.decodeIfPresent(Bool.self, forKey: .isCouponManagementSwitchEnabled) ?? false

Storage/StorageTests/Model/AppSettings/GeneralAppSettingsTests.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ final class GeneralAppSettingsTests: XCTestCase {
6262
feedbacks: feedbackSettings,
6363
isViewAddOnsSwitchEnabled: true,
6464
isOrderCreationSwitchEnabled: true,
65-
isStripeInPersonPaymentsSwitchEnabled: true,
6665
isCanadaInPersonPaymentsSwitchEnabled: true,
6766
isProductSKUInputScannerSwitchEnabled: true,
6867
isCouponManagementSwitchEnabled: true,
@@ -85,7 +84,6 @@ final class GeneralAppSettingsTests: XCTestCase {
8584
assertEqual(newSettings.lastEligibilityErrorInfo, eligibilityInfo)
8685
assertEqual(newSettings.isViewAddOnsSwitchEnabled, false)
8786
assertEqual(newSettings.isOrderCreationSwitchEnabled, true)
88-
assertEqual(newSettings.isStripeInPersonPaymentsSwitchEnabled, true)
8987
assertEqual(newSettings.isCanadaInPersonPaymentsSwitchEnabled, true)
9088
assertEqual(newSettings.isProductSKUInputScannerSwitchEnabled, true)
9189
assertEqual(newSettings.isCouponManagementSwitchEnabled, true)
@@ -98,7 +96,6 @@ private extension GeneralAppSettingsTests {
9896
feedbacks: [FeedbackType: FeedbackSettings] = [:],
9997
isViewAddOnsSwitchEnabled: Bool = false,
10098
isOrderCreationSwitchEnabled: Bool = false,
101-
isStripeInPersonPaymentsSwitchEnabled: Bool = false,
10299
isCanadaInPersonPaymentsSwitchEnabled: Bool = false,
103100
isProductSKUInputScannerSwitchEnabled: Bool = false,
104101
isCouponManagementSwitchEnabled: Bool = false,
@@ -109,7 +106,6 @@ private extension GeneralAppSettingsTests {
109106
feedbacks: feedbacks,
110107
isViewAddOnsSwitchEnabled: isViewAddOnsSwitchEnabled,
111108
isOrderCreationSwitchEnabled: isOrderCreationSwitchEnabled,
112-
isStripeInPersonPaymentsSwitchEnabled: isStripeInPersonPaymentsSwitchEnabled,
113109
isCanadaInPersonPaymentsSwitchEnabled: isCanadaInPersonPaymentsSwitchEnabled,
114110
isProductSKUInputScannerSwitchEnabled: isProductSKUInputScannerSwitchEnabled,
115111
isCouponManagementSwitchEnabled: isCouponManagementSwitchEnabled,

WooCommerce/Classes/Tools/In-Person Payments/CardPresentConfigurationLoader.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,9 @@ import Foundation
22
import Yosemite
33

44
final class CardPresentConfigurationLoader {
5-
private var stripeGatewayIPPEnabled: Bool = false
65
private var canadaIPPEnabled: Bool = false
76

87
init(stores: StoresManager = ServiceLocator.stores) {
9-
let stripeAction = AppSettingsAction.loadStripeInPersonPaymentsSwitchState(onCompletion: { [weak self] result in
10-
if case .success(let stripeGatewayIPPEnabled) = result {
11-
self?.stripeGatewayIPPEnabled = stripeGatewayIPPEnabled
12-
}
13-
})
14-
stores.dispatch(stripeAction)
15-
168
let canadaAction = AppSettingsAction.loadCanadaInPersonPaymentsSwitchState(onCompletion: { [weak self] result in
179
if case .success(let canadaIPPEnabled) = result {
1810
self?.canadaIPPEnabled = canadaIPPEnabled
@@ -24,7 +16,6 @@ final class CardPresentConfigurationLoader {
2416
var configuration: CardPresentPaymentsConfiguration {
2517
.init(
2618
country: SiteAddress().countryCode,
27-
stripeEnabled: stripeGatewayIPPEnabled,
2819
canadaEnabled: canadaIPPEnabled
2920
)
3021
}

WooCommerce/Classes/ViewRelated/Dashboard/Settings/Beta features/BetaFeaturesViewController.swift

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ private extension BetaFeaturesViewController {
9494
func inPersonPaymentsSection() -> Section? {
9595
var rows: [Row] = []
9696

97-
if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.stripeExtensionInPersonPayments) {
98-
rows += [.stripeExtensionInPersonPayments, .stripeExtensionInPersonPaymentsDescription]
99-
}
100-
10197
if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.canadaInPersonPayments) {
10298
rows += [.canadaInPersonPayments, .canadaInPersonPaymentsDescription]
10399
}
@@ -153,11 +149,6 @@ private extension BetaFeaturesViewController {
153149
configureOrderCreationSwitch(cell: cell)
154150
case let cell as BasicTableViewCell where row == .orderCreationDescription:
155151
configureOrderCreationDescription(cell: cell)
156-
// WooCommerce Stripe Payment Gateway extension In-Person Payments
157-
case let cell as SwitchTableViewCell where row == .stripeExtensionInPersonPayments:
158-
configureStripeExtensionInPersonPaymentsSwitch(cell: cell)
159-
case let cell as BasicTableViewCell where row == .stripeExtensionInPersonPaymentsDescription:
160-
configureStripeExtensionInPersonPaymentsDescription(cell: cell)
161152
// In-Person Payments in Canada
162153
case let cell as SwitchTableViewCell where row == .canadaInPersonPayments:
163154
configureCanadaInPersonPaymentsSwitch(cell: cell)
@@ -243,37 +234,6 @@ private extension BetaFeaturesViewController {
243234
cell.textLabel?.text = Localization.orderCreationDescription
244235
}
245236

246-
func configureStripeExtensionInPersonPaymentsSwitch(cell: SwitchTableViewCell) {
247-
configureCommonStylesForSwitchCell(cell)
248-
cell.title = Localization.stripeExtensionInPersonPaymentsTitle
249-
250-
// Fetch switch's state stored value.
251-
let action = AppSettingsAction.loadStripeInPersonPaymentsSwitchState { result in
252-
guard let isEnabled = try? result.get() else {
253-
return cell.isOn = false
254-
}
255-
cell.isOn = isEnabled
256-
}
257-
ServiceLocator.stores.dispatch(action)
258-
259-
// Change switch's state stored value
260-
cell.onChange = { isSwitchOn in
261-
let action = AppSettingsAction.setStripeInPersonPaymentsSwitchState(isEnabled: isSwitchOn, onCompletion: { result in
262-
// Roll back toggle if an error occurred
263-
if result.isFailure {
264-
cell.isOn.toggle()
265-
}
266-
})
267-
ServiceLocator.stores.dispatch(action)
268-
}
269-
cell.accessibilityIdentifier = "beta-features-stripe-extension-in-person-payments-cell"
270-
}
271-
272-
func configureStripeExtensionInPersonPaymentsDescription(cell: BasicTableViewCell) {
273-
configureCommonStylesForDescriptionCell(cell)
274-
cell.textLabel?.text = Localization.stripeExtensionInPersonPaymentsDescription
275-
}
276-
277237
func configureCanadaInPersonPaymentsSwitch(cell: SwitchTableViewCell) {
278238
configureCommonStylesForSwitchCell(cell)
279239
cell.title = Localization.canadaExtensionInPersonPaymentsTitle
@@ -434,10 +394,6 @@ private enum Row: CaseIterable {
434394
case orderCreation
435395
case orderCreationDescription
436396

437-
// WooCommerce Stripe Payment Gateway extension In-Person Payments
438-
case stripeExtensionInPersonPayments
439-
case stripeExtensionInPersonPaymentsDescription
440-
441397
// In-Person Payments in Canada
442398
case canadaInPersonPayments
443399
case canadaInPersonPaymentsDescription
@@ -452,9 +408,9 @@ private enum Row: CaseIterable {
452408

453409
var type: UITableViewCell.Type {
454410
switch self {
455-
case .orderAddOns, .orderCreation, .stripeExtensionInPersonPayments, .canadaInPersonPayments, .productSKUInputScanner, .couponManagement:
411+
case .orderAddOns, .orderCreation, .canadaInPersonPayments, .productSKUInputScanner, .couponManagement:
456412
return SwitchTableViewCell.self
457-
case .orderAddOnsDescription, .orderCreationDescription, .stripeExtensionInPersonPaymentsDescription, .canadaInPersonPaymentsDescription,
413+
case .orderAddOnsDescription, .orderCreationDescription, .canadaInPersonPaymentsDescription,
458414
.productSKUInputScannerDescription, .couponManagementDescription:
459415
return BasicTableViewCell.self
460416
}
@@ -481,15 +437,6 @@ private extension BetaFeaturesViewController {
481437
"Test out creating new manual orders as we get ready to launch",
482438
comment: "Cell description on the beta features screen to enable creating new orders")
483439

484-
static let stripeExtensionInPersonPaymentsTitle = NSLocalizedString(
485-
"IPP with Stripe extension",
486-
comment: "Cell title on beta features screen to enable accepting in-person payments for stores with the " +
487-
"WooCommerce Stripe Payment Gateway extension")
488-
static let stripeExtensionInPersonPaymentsDescription = NSLocalizedString(
489-
"Test out In-Person Payments with the Stripe Payment Gateway extension",
490-
comment: "Cell description on beta features screen to enable accepting in-person payments for stores with " +
491-
"the WooCommerce Stripe Payment Gateway extension")
492-
493440
static let canadaExtensionInPersonPaymentsTitle = NSLocalizedString(
494441
"In-Person Payments in Canada",
495442
comment: "Cell title on beta features screen to enable accepting in-person payments for stores in Canada ")

WooCommerce/Classes/Yosemite/AuthenticatedState.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ class AuthenticatedState: StoresManagerState {
2626
let storageManager = ServiceLocator.storageManager
2727
let network = AlamofireNetwork(credentials: credentials)
2828

29-
/// TODO - remove this feature flag related logic when no longer needed
30-
let allowStripeIPP = ServiceLocator.featureFlagService.isFeatureFlagEnabled(.stripeExtensionInPersonPayments)
31-
3229
services = [
3330
AccountStore(dispatcher: dispatcher, storageManager: storageManager, network: network),
3431
AppSettingsStore(dispatcher: dispatcher, storageManager: storageManager, fileStorage: PListFileStorage()),
@@ -67,8 +64,7 @@ class AuthenticatedState: StoresManagerState {
6764
CardPresentPaymentStore(dispatcher: dispatcher,
6865
storageManager: storageManager,
6966
network: network,
70-
cardReaderService: ServiceLocator.cardReaderService,
71-
allowStripeIPP: allowStripeIPP),
67+
cardReaderService: ServiceLocator.cardReaderService),
7268
ReceiptStore(dispatcher: dispatcher,
7369
storageManager: storageManager,
7470
network: network,

WooCommerce/WooCommerceTests/Tools/In-Person Payments/CardPresentConfigurationLoaderTests.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ final class CardPresentConfigurationLoaderTests: XCTestCase {
2121
stores = MockStoresManager(sessionManager: .makeForTesting(authenticated: true))
2222
stores.whenReceivingAction(ofType: AppSettingsAction.self) { action in
2323
switch action {
24-
case .loadStripeInPersonPaymentsSwitchState(let completion):
25-
completion(.success(true))
2624
case .loadCanadaInPersonPaymentsSwitchState(let completion):
2725
completion(.success(true))
2826
default:
@@ -103,8 +101,6 @@ private extension CardPresentConfigurationLoaderTests {
103101
func setupFeatures(stripe: Bool, canada: Bool) {
104102
stores.whenReceivingAction(ofType: AppSettingsAction.self) { action in
105103
switch action {
106-
case .loadStripeInPersonPaymentsSwitchState(onCompletion: let completion):
107-
completion(.success(stripe))
108104
case .loadCanadaInPersonPaymentsSwitchState(onCompletion: let completion):
109105
completion(.success(canada))
110106
default:

0 commit comments

Comments
 (0)