Skip to content

Commit da34989

Browse files
committed
Rename Quick Order to Simple Payments
1 parent 39a8272 commit da34989

28 files changed

+259
-258
lines changed

Experiments/Experiments/DefaultFeatureFlagService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
2121
return true
2222
case .pushNotificationsForAllStores:
2323
return buildConfig == .localDeveloper || buildConfig == .alpha
24-
case .quickOrderPrototype:
24+
case .simplePaymentsPrototype:
2525
return buildConfig == .localDeveloper || buildConfig == .alpha
2626
case .orderListFilters:
2727
return buildConfig == .localDeveloper || buildConfig == .alpha

Experiments/Experiments/FeatureFlag.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ public enum FeatureFlag: Int {
4242
///
4343
case pushNotificationsForAllStores
4444

45-
/// Allows to create quick order orders
45+
/// Allows to create simple payments orders
4646
///
47-
case quickOrderPrototype
47+
case simplePaymentsPrototype
4848

4949
/// Display the bar for displaying the filters in the Order List
5050
///

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ extension GeneralAppSettings {
99
installationDate: NullableCopiableProp<Date> = .copy,
1010
feedbacks: CopiableProp<[FeedbackType: FeedbackSettings]> = .copy,
1111
isViewAddOnsSwitchEnabled: CopiableProp<Bool> = .copy,
12-
isQuickOrderSwitchEnabled: CopiableProp<Bool> = .copy,
12+
isSimplePaymentsSwitchEnabled: CopiableProp<Bool> = .copy,
1313
knownCardReaders: CopiableProp<[String]> = .copy,
1414
lastEligibilityErrorInfo: NullableCopiableProp<EligibilityErrorInfo> = .copy
1515
) -> GeneralAppSettings {
1616
let installationDate = installationDate ?? self.installationDate
1717
let feedbacks = feedbacks ?? self.feedbacks
1818
let isViewAddOnsSwitchEnabled = isViewAddOnsSwitchEnabled ?? self.isViewAddOnsSwitchEnabled
19-
let isQuickOrderSwitchEnabled = isQuickOrderSwitchEnabled ?? self.isQuickOrderSwitchEnabled
19+
let isSimplePaymentsSwitchEnabled = isSimplePaymentsSwitchEnabled ?? self.isSimplePaymentsSwitchEnabled
2020
let knownCardReaders = knownCardReaders ?? self.knownCardReaders
2121
let lastEligibilityErrorInfo = lastEligibilityErrorInfo ?? self.lastEligibilityErrorInfo
2222

2323
return GeneralAppSettings(
2424
installationDate: installationDate,
2525
feedbacks: feedbacks,
2626
isViewAddOnsSwitchEnabled: isViewAddOnsSwitchEnabled,
27-
isQuickOrderSwitchEnabled: isQuickOrderSwitchEnabled,
27+
isSimplePaymentsSwitchEnabled: isSimplePaymentsSwitchEnabled,
2828
knownCardReaders: knownCardReaders,
2929
lastEligibilityErrorInfo: lastEligibilityErrorInfo
3030
)

Storage/Storage/Model/GeneralAppSettings.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
2424
///
2525
public let isViewAddOnsSwitchEnabled: Bool
2626

27-
/// The state(`true` or `false`) for the Quick Order feature switch.
27+
/// The state(`true` or `false`) for the Simple Payments feature switch.
2828
///
29-
public let isQuickOrderSwitchEnabled: Bool
29+
public let isSimplePaymentsSwitchEnabled: Bool
3030

3131
/// A list (possibly empty) of known card reader IDs - i.e. IDs of card readers that should be reconnected to automatically
3232
/// e.g. ["CHB204909005931"]
@@ -40,13 +40,13 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
4040
public init(installationDate: Date?,
4141
feedbacks: [FeedbackType: FeedbackSettings],
4242
isViewAddOnsSwitchEnabled: Bool,
43-
isQuickOrderSwitchEnabled: Bool,
43+
isSimplePaymentsSwitchEnabled: Bool,
4444
knownCardReaders: [String],
4545
lastEligibilityErrorInfo: EligibilityErrorInfo? = nil) {
4646
self.installationDate = installationDate
4747
self.feedbacks = feedbacks
4848
self.isViewAddOnsSwitchEnabled = isViewAddOnsSwitchEnabled
49-
self.isQuickOrderSwitchEnabled = isQuickOrderSwitchEnabled
49+
self.isSimplePaymentsSwitchEnabled = isSimplePaymentsSwitchEnabled
5050
self.knownCardReaders = knownCardReaders
5151
self.lastEligibilityErrorInfo = lastEligibilityErrorInfo
5252
}
@@ -72,7 +72,7 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
7272
installationDate: installationDate,
7373
feedbacks: updatedFeedbacks,
7474
isViewAddOnsSwitchEnabled: isViewAddOnsSwitchEnabled,
75-
isQuickOrderSwitchEnabled: isQuickOrderSwitchEnabled,
75+
isSimplePaymentsSwitchEnabled: isSimplePaymentsSwitchEnabled,
7676
knownCardReaders: knownCardReaders,
7777
lastEligibilityErrorInfo: lastEligibilityErrorInfo
7878
)
@@ -89,7 +89,7 @@ extension GeneralAppSettings {
8989
self.installationDate = try container.decodeIfPresent(Date.self, forKey: .installationDate)
9090
self.feedbacks = try container.decodeIfPresent([FeedbackType: FeedbackSettings].self, forKey: .feedbacks) ?? [:]
9191
self.isViewAddOnsSwitchEnabled = try container.decodeIfPresent(Bool.self, forKey: .isViewAddOnsSwitchEnabled) ?? false
92-
self.isQuickOrderSwitchEnabled = try container.decodeIfPresent(Bool.self, forKey: .isQuickOrderSwitchEnabled) ?? false
92+
self.isSimplePaymentsSwitchEnabled = try container.decodeIfPresent(Bool.self, forKey: .isSimplePaymentsSwitchEnabled) ?? false
9393
self.knownCardReaders = try container.decodeIfPresent([String].self, forKey: .knownCardReaders) ?? []
9494
self.lastEligibilityErrorInfo = try container.decodeIfPresent(EligibilityErrorInfo.self, forKey: .lastEligibilityErrorInfo)
9595

Storage/StorageTests/Model/AppSettings/GeneralAppSettingsTests.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class GeneralAppSettingsTests: XCTestCase {
99
let settings = GeneralAppSettings(installationDate: nil,
1010
feedbacks: [.general: feedback],
1111
isViewAddOnsSwitchEnabled: false,
12-
isQuickOrderSwitchEnabled: false,
12+
isSimplePaymentsSwitchEnabled: false,
1313
knownCardReaders: [])
1414

1515
// When
@@ -24,7 +24,7 @@ class GeneralAppSettingsTests: XCTestCase {
2424
let settings = GeneralAppSettings(installationDate: nil,
2525
feedbacks: [:],
2626
isViewAddOnsSwitchEnabled: false,
27-
isQuickOrderSwitchEnabled: false,
27+
isSimplePaymentsSwitchEnabled: false,
2828
knownCardReaders: [])
2929

3030
// When
@@ -41,7 +41,7 @@ class GeneralAppSettingsTests: XCTestCase {
4141
installationDate: nil,
4242
feedbacks: [.general: existingFeedback],
4343
isViewAddOnsSwitchEnabled: false,
44-
isQuickOrderSwitchEnabled: false,
44+
isSimplePaymentsSwitchEnabled: false,
4545
knownCardReaders: []
4646
)
4747

@@ -58,7 +58,7 @@ class GeneralAppSettingsTests: XCTestCase {
5858
let settings = GeneralAppSettings(installationDate: nil,
5959
feedbacks: [:],
6060
isViewAddOnsSwitchEnabled: false,
61-
isQuickOrderSwitchEnabled: false,
61+
isSimplePaymentsSwitchEnabled: false,
6262
knownCardReaders: [])
6363

6464
// When
@@ -78,7 +78,7 @@ class GeneralAppSettingsTests: XCTestCase {
7878
let previousSettings = GeneralAppSettings(installationDate: currentDate,
7979
feedbacks: feedbackSettings,
8080
isViewAddOnsSwitchEnabled: true,
81-
isQuickOrderSwitchEnabled: true,
81+
isSimplePaymentsSwitchEnabled: true,
8282
knownCardReaders: readers,
8383
lastEligibilityErrorInfo: eligibilityInfo)
8484

@@ -96,6 +96,6 @@ class GeneralAppSettingsTests: XCTestCase {
9696
assertEqual(newSettings.knownCardReaders, readers)
9797
assertEqual(newSettings.lastEligibilityErrorInfo, eligibilityInfo)
9898
assertEqual(newSettings.isViewAddOnsSwitchEnabled, false)
99-
assertEqual(newSettings.isQuickOrderSwitchEnabled, true)
99+
assertEqual(newSettings.isSimplePaymentsSwitchEnabled, true)
100100
}
101101
}

WooCommerce/Classes/Analytics/WooAnalyticsEvent.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ extension WooAnalyticsEvent {
6464
case shippingLabelsRelease3 = "shipping_labels_m3"
6565
/// Shown in beta feature banner for order add-ons.
6666
case addOnsI1 = "add-ons_i1"
67-
/// Shown in beta feature banner for quick order prototype.
68-
case quickOrderPrototype = "quick_order_prototype"
67+
/// Shown in beta feature banner for simple payments prototype.
68+
case simplePaymentsPrototype = "simple_payments_prototype"
6969
}
7070

7171
/// The action performed on the survey screen.
@@ -371,36 +371,36 @@ extension WooAnalyticsEvent {
371371
}
372372
}
373373

374-
// MARK: - Quick Order
374+
// MARK: - Simple Payments
375375
//
376376
extension WooAnalyticsEvent {
377377
// Namespace
378-
enum QuickOrder {
378+
enum SimplePayments {
379379
/// Common event keys
380380
///
381381
private enum Keys {
382382
static let state = "state"
383383
static let amount = "amount"
384384
}
385385

386-
static func quickOrderFlowStarted() -> WooAnalyticsEvent {
387-
WooAnalyticsEvent(statName: .quickOrderFlowStarted, properties: [:])
386+
static func simplePaymentsFlowStarted() -> WooAnalyticsEvent {
387+
WooAnalyticsEvent(statName: .simplePaymentsFlowStarted, properties: [:])
388388
}
389389

390-
static func quickOrderFlowCompleted(amount: String) -> WooAnalyticsEvent {
391-
WooAnalyticsEvent(statName: .quickOrderFlowCompleted, properties: [Keys.amount: amount])
390+
static func simplePaymentsFlowCompleted(amount: String) -> WooAnalyticsEvent {
391+
WooAnalyticsEvent(statName: .simplePaymentsFlowCompleted, properties: [Keys.amount: amount])
392392
}
393393

394-
static func quickOrderFlowCanceled() -> WooAnalyticsEvent {
395-
WooAnalyticsEvent(statName: .quickOrderFlowCanceled, properties: [:])
394+
static func simplePaymentsFlowCanceled() -> WooAnalyticsEvent {
395+
WooAnalyticsEvent(statName: .simplePaymentsFlowCanceled, properties: [:])
396396
}
397397

398-
static func quickOrderFlowFailed() -> WooAnalyticsEvent {
399-
WooAnalyticsEvent(statName: .quickOrderFlowFailed, properties: [:])
398+
static func simplePaymentsFlowFailed() -> WooAnalyticsEvent {
399+
WooAnalyticsEvent(statName: .simplePaymentsFlowFailed, properties: [:])
400400
}
401401

402-
static func settingsBetaFeaturesQuickOrderToggled(isOn: Bool) -> WooAnalyticsEvent {
403-
WooAnalyticsEvent(statName: .settingsBetaFeaturesQuickOrderToggled, properties: [Keys.state: isOn ? "on" : "off"])
402+
static func settingsBetaFeaturesSimplePaymentsToggled(isOn: Bool) -> WooAnalyticsEvent {
403+
WooAnalyticsEvent(statName: .settingsBetaFeaturesSimplePaymentsToggled, properties: [Keys.state: isOn ? "on" : "off"])
404404
}
405405
}
406406
}

WooCommerce/Classes/Analytics/WooAnalyticsStat.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public enum WooAnalyticsStat: String {
130130
case settingsBetaFeaturesButtonTapped = "settings_beta_features_button_tapped"
131131
case settingsBetaFeaturesProductsToggled = "settings_beta_features_products_toggled"
132132
case settingsBetaFeaturesOrderAddOnsToggled = "settings_beta_features_order_addons_toggled"
133-
case settingsBetaFeaturesQuickOrderToggled = "settings_beta_features_quick_order_toggled"
133+
case settingsBetaFeaturesSimplePaymentsToggled = "settings_beta_features_simple_payments_toggled"
134134

135135
case settingsPrivacySettingsTapped = "settings_privacy_settings_button_tapped"
136136
case settingsCollectInfoToggled = "privacy_settings_collect_info_toggled"
@@ -512,12 +512,12 @@ public enum WooAnalyticsStat: String {
512512
//
513513
case featureAnnouncementShown = "feature_announcement_shown"
514514

515-
// MARK: Quick Order events
515+
// MARK: Simple Payments events
516516
//
517-
case quickOrderFlowStarted = "quick_order_flow_started"
518-
case quickOrderFlowCompleted = "quick_order_flow_completed"
519-
case quickOrderFlowCanceled = "quick_order_flow_canceled"
520-
case quickOrderFlowFailed = "quick_order_flow_failed"
517+
case simplePaymentsFlowStarted = "simple_payments_flow_started"
518+
case simplePaymentsFlowCompleted = "simple_payments_flow_completed"
519+
case simplePaymentsFlowCanceled = "simple_payments_flow_canceled"
520+
case simplePaymentsFlowFailed = "simple_payments_flow_failed"
521521
}
522522

523523
public extension WooAnalyticsStat {

WooCommerce/Classes/System/WooConstants.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ extension WooConstants {
124124
case addPaymentMethodWCShip = "https://wordpress.com/me/purchases/add-payment-method"
125125

126126
#if DEBUG
127-
case quickOrderPrototypeFeedback = "https://automattic.survey.fm/woo-app-quick-order-testing"
127+
case simplePaymentsPrototypeFeedback = "https://automattic.survey.fm/woo-app-simple-payments-testing"
128128
#else
129-
case quickOrderPrototypeFeedback = "https://automattic.survey.fm/woo-app-quick-order-production"
129+
case simplePaymentsPrototypeFeedback = "https://automattic.survey.fm/woo-app-simple-payments-production"
130130
#endif
131131

132132
/// Returns the URL version of the receiver

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

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ private extension BetaFeaturesViewController {
9494
return nil
9595
}
9696

97-
return Section(rows: [.quickOrder,
98-
.quickOrderDescription])
97+
return Section(rows: [.simplePayments,
98+
.simplePaymentsDescription])
9999
}
100100

101101
/// Register table cells.
@@ -121,10 +121,10 @@ private extension BetaFeaturesViewController {
121121
case let cell as BasicTableViewCell where row == .orderAddOnsDescription:
122122
configureOrderAddOnsDescription(cell: cell)
123123
// Orders
124-
case let cell as SwitchTableViewCell where row == .quickOrder:
125-
configureQuickOrderSwitch(cell: cell)
126-
case let cell as BasicTableViewCell where row == .quickOrderDescription:
127-
configureQuickOrderDescription(cell: cell)
124+
case let cell as SwitchTableViewCell where row == .simplePayments:
125+
configureSimplePaymentsSwitch(cell: cell)
126+
case let cell as BasicTableViewCell where row == .simplePaymentsDescription:
127+
configureSimplePaymentsDescription(cell: cell)
128128
default:
129129
fatalError()
130130
}
@@ -165,12 +165,12 @@ private extension BetaFeaturesViewController {
165165
cell.textLabel?.text = Localization.orderAddOnsDescription
166166
}
167167

168-
func configureQuickOrderSwitch(cell: SwitchTableViewCell) {
168+
func configureSimplePaymentsSwitch(cell: SwitchTableViewCell) {
169169
configureCommonStylesForSwitchCell(cell)
170-
cell.title = Localization.quickOrderTitle
170+
cell.title = Localization.simplePaymentsTitle
171171

172172
// Fetch switch's state stored value.
173-
let action = AppSettingsAction.loadQuickOrderSwitchState() { result in
173+
let action = AppSettingsAction.loadSimplePaymentsSwitchState() { result in
174174
guard let isEnabled = try? result.get() else {
175175
return cell.isOn = false
176176
}
@@ -180,22 +180,22 @@ private extension BetaFeaturesViewController {
180180

181181
// Change switch's state stored value
182182
cell.onChange = { isSwitchOn in
183-
ServiceLocator.analytics.track(event: WooAnalyticsEvent.QuickOrder.settingsBetaFeaturesQuickOrderToggled(isOn: isSwitchOn))
183+
ServiceLocator.analytics.track(event: WooAnalyticsEvent.SimplePayments.settingsBetaFeaturesSimplePaymentsToggled(isOn: isSwitchOn))
184184

185-
let action = AppSettingsAction.setQuickOrderFeatureSwitchState(isEnabled: isSwitchOn, onCompletion: { result in
185+
let action = AppSettingsAction.setSimplePaymentsFeatureSwitchState(isEnabled: isSwitchOn, onCompletion: { result in
186186
// Roll back toggle if an error occurred
187187
if result.isFailure {
188188
cell.isOn.toggle()
189189
}
190190
})
191191
ServiceLocator.stores.dispatch(action)
192192
}
193-
cell.accessibilityIdentifier = "beta-features-order-quick-order-cell"
193+
cell.accessibilityIdentifier = "beta-features-order-simple-payments-cell"
194194
}
195195

196-
func configureQuickOrderDescription(cell: BasicTableViewCell) {
196+
func configureSimplePaymentsDescription(cell: BasicTableViewCell) {
197197
configureCommonStylesForDescriptionCell(cell)
198-
cell.textLabel?.text = Localization.quickOrderDescription
198+
cell.textLabel?.text = Localization.simplePaymentsDescription
199199
}
200200
}
201201

@@ -262,14 +262,14 @@ private enum Row: CaseIterable {
262262
case orderAddOnsDescription
263263

264264
// Orders.
265-
case quickOrder
266-
case quickOrderDescription
265+
case simplePayments
266+
case simplePaymentsDescription
267267

268268
var type: UITableViewCell.Type {
269269
switch self {
270-
case .orderAddOns, .quickOrder:
270+
case .orderAddOns, .simplePayments:
271271
return SwitchTableViewCell.self
272-
case .orderAddOnsDescription, .quickOrderDescription:
272+
case .orderAddOnsDescription, .simplePaymentsDescription:
273273
return BasicTableViewCell.self
274274
}
275275
}
@@ -285,8 +285,9 @@ private extension BetaFeaturesViewController {
285285
static let orderAddOnsDescription = NSLocalizedString("Test out viewing Order Add-Ons as we get ready to launch",
286286
comment: "Cell description on the beta features screen to enable the order add-ons feature")
287287

288-
static let quickOrderTitle = NSLocalizedString("Quick Order", comment: "Cell title on the beta features screen to enable the Quick Order feature")
289-
static let quickOrderDescription = NSLocalizedString("Test out creating orders with minimal information as we get ready to launch",
290-
comment: "Cell description on the beta features screen to enable the Quick Order feature")
288+
static let simplePaymentsTitle = NSLocalizedString("Simple Payments",
289+
comment: "Cell title on the beta features screen to enable the Simple Payments feature")
290+
static let simplePaymentsDescription = NSLocalizedString("Test out creating orders with minimal information as we get ready to launch",
291+
comment: "Cell description on the beta features screen to enable the Simple Payments feature")
291292
}
292293
}

0 commit comments

Comments
 (0)