Skip to content

Commit 557e235

Browse files
authored
Merge branch 'trunk' into issue/7468-no-stores-site-discovery
2 parents 774232a + 0eda7b2 commit 557e235

File tree

96 files changed

+938
-462
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+938
-462
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!--
2+
Contains editorialized release notes. Raw release notes should go into `RELEASE-NOTES.txt`.
3+
-->
4+
5+
## 9.9
6+
This release has a few improvements to your login experience, including the option to use your `wp-admin` site credentials and magic link option to login. Please continue to send us feedback – we are listening!

Experiments/Experiments/DefaultFeatureFlagService.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
4949
return true
5050
case .loginErrorNotifications:
5151
return true
52-
case .paymentsHubMenuSection:
53-
return buildConfig == .localDeveloper || buildConfig == .alpha
5452
case .loginPrologueOnboardingSurvey:
5553
return true
5654
case .loginMagicLinkEmphasis:
5755
return true
5856
case .loginMagicLinkEmphasisM2:
5957
return true
58+
case .promptToEnableCodInIppOnboarding:
59+
return buildConfig == .localDeveloper || buildConfig == .alpha
6060
default:
6161
return true
6262
}

Experiments/Experiments/FeatureFlag.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,6 @@ public enum FeatureFlag: Int {
102102
///
103103
case loginErrorNotifications
104104

105-
/// Payments Section in the Hub Menu
106-
///
107-
case paymentsHubMenuSection
108-
109105
/// Whether to show a survey at the end of the login onboarding screen after feature carousel
110106
///
111107
case loginPrologueOnboardingSurvey
@@ -117,4 +113,8 @@ public enum FeatureFlag: Int {
117113
/// Whether to show the magic link as a secondary button instead of a table view cell on the password screen
118114
///
119115
case loginMagicLinkEmphasisM2
116+
117+
/// Whether to include the Cash on Delivery enable step in In-Person Payment onboarding
118+
///
119+
case promptToEnableCodInIppOnboarding
120120
}

Hardware/Hardware/CardReader/CardReaderType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// Card reader type. Indicates if a reader is meant to be used
22
/// handheld or as a countertop device
3-
public enum CardReaderType {
3+
public enum CardReaderType: CaseIterable {
44
/// Chipper
55
case chipper
66
/// Stripe M2

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,33 @@ extension OrderTaxLine {
658658
}
659659
}
660660

661+
extension PaymentGateway {
662+
public func copy(
663+
siteID: CopiableProp<Int64> = .copy,
664+
gatewayID: CopiableProp<String> = .copy,
665+
title: CopiableProp<String> = .copy,
666+
description: CopiableProp<String> = .copy,
667+
enabled: CopiableProp<Bool> = .copy,
668+
features: CopiableProp<[PaymentGateway.Feature]> = .copy
669+
) -> PaymentGateway {
670+
let siteID = siteID ?? self.siteID
671+
let gatewayID = gatewayID ?? self.gatewayID
672+
let title = title ?? self.title
673+
let description = description ?? self.description
674+
let enabled = enabled ?? self.enabled
675+
let features = features ?? self.features
676+
677+
return PaymentGateway(
678+
siteID: siteID,
679+
gatewayID: gatewayID,
680+
title: title,
681+
description: description,
682+
enabled: enabled,
683+
features: features
684+
)
685+
}
686+
}
687+
661688
extension PaymentGatewayAccount {
662689
public func copy(
663690
siteID: CopiableProp<Int64> = .copy,

Networking/Networking/Model/Order.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public struct Order: Decodable, GeneratedCopiable, GeneratedFakeable {
7575
paymentMethodTitle: String,
7676
paymentURL: URL?,
7777
chargeID: String?,
78-
items: [OrderItem]?,
78+
items: [OrderItem],
7979
billingAddress: Address?,
8080
shippingAddress: Address?,
8181
shippingLines: [ShippingLine],
@@ -114,7 +114,7 @@ public struct Order: Decodable, GeneratedCopiable, GeneratedFakeable {
114114
self.paymentURL = paymentURL
115115
self.chargeID = chargeID
116116

117-
self.items = items ?? []
117+
self.items = items
118118
self.billingAddress = billingAddress
119119
self.shippingAddress = shippingAddress
120120
self.shippingLines = shippingLines
@@ -166,7 +166,7 @@ public struct Order: Decodable, GeneratedCopiable, GeneratedFakeable {
166166
var chargeID: String? = nil
167167
chargeID = allOrderMetaData?.first(where: { $0.key == "_charge_id" })?.value
168168

169-
let items = try? container.decodeIfPresent([OrderItem].self, forKey: .items) ?? []
169+
let items = try container.decode([OrderItem].self, forKey: .items)
170170

171171
var shippingAddress = try? container.decode(Address.self, forKey: .shippingAddress)
172172
// In WooCommerce <5.6.0, the shipping phone number can be stored in the order metadata

Networking/Networking/Model/PaymentGateway.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Codegen
33

44
/// Represents a Payment Gateway.
55
///
6-
public struct PaymentGateway: Equatable, GeneratedFakeable {
6+
public struct PaymentGateway: Equatable, GeneratedFakeable, GeneratedCopiable {
77

88
/// Features for payment gateway.
99
///

Networking/Networking/Remote/OrdersRemote.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,20 +288,20 @@ public extension OrdersRemote {
288288
}
289289

290290
enum ParameterValues {
291-
// Same as singleOrderFieldValues except we exclude the line_items and shipping fields
291+
// Same as singleOrderFieldValues except we exclude the shipping field
292292
static let listFieldValues: String = commonOrderFieldValues.joined(separator: ",")
293293
static let singleOrderFieldValues: String = (commonOrderFieldValues + singleOrderExtraFieldValues).joined(separator: ",")
294294
private static let commonOrderFieldValues = [
295295
"id", "parent_id", "number", "status", "currency", "customer_id", "customer_note", "date_created_gmt", "date_modified_gmt", "date_paid_gmt",
296296
"discount_total", "discount_tax", "shipping_total", "shipping_tax", "total", "total_tax", "payment_method", "payment_method_title",
297-
"payment_url", "billing", "coupon_lines", "shipping_lines", "refunds", "fee_lines", "order_key", "tax_lines", "meta_data", "is_editable",
298-
"needs_payment", "needs_processing"
297+
"payment_url", "line_items", "billing", "coupon_lines", "shipping_lines", "refunds", "fee_lines", "order_key", "tax_lines", "meta_data",
298+
"is_editable", "needs_payment", "needs_processing"
299299
]
300300
// Use with caution. Any fields in here will be overwritten with empty values by
301301
// `Order+ReadOnlyConvertible.swift: Order.update(with:)` when the list of orders is fetched.
302302
// See p91TBi-7yL-p2 for discussion.
303303
private static let singleOrderExtraFieldValues = [
304-
"line_items", "shipping"
304+
"shipping"
305305
]
306306
}
307307

RELEASE-NOTES.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
10.0
44
-----
5-
- [*] Login: New button added to the empty site picker screen to enter a site address for troubleshooting. [https://github.com/woocommerce/woocommerce-ios/pull/7484]
5+
- [**] In-Person Payments and Simple Payments have been moved to a new Payments section [https://github.com/woocommerce/woocommerce-ios/pull/7473]
66
- [*] Login: on the WP.com password screen, the magic link login option is moved from below "Reset your password" to below the primary Continue button for higher visibility. [https://github.com/woocommerce/woocommerce-ios/pull/7469]
77
- [*] Login: some minor enhancements are made to the error screen after entering an invalid WP.com email - a new "What is WordPress.com?" link, hiding the "Log in with store address" button when it's from the store address login flow, and some copy changes. [https://github.com/woocommerce/woocommerce-ios/pull/7485]
8+
- [**] In-Person Payments: Accounts with pending requirements are no longer blocked from taking payments - we have added a skip button to the relevant screen. [https://github.com/woocommerce/woocommerce-ios/pull/7504]
9+
- [*] Login: New button added to the empty site picker screen to enter a site address for troubleshooting. [https://github.com/woocommerce/woocommerce-ios/pull/7484]
810

911
9.9
1012
-----

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,21 @@ extension GeneralStoreSettings {
6060
isTelemetryAvailable: CopiableProp<Bool> = .copy,
6161
telemetryLastReportedTime: NullableCopiableProp<Date> = .copy,
6262
areSimplePaymentTaxesEnabled: CopiableProp<Bool> = .copy,
63-
preferredInPersonPaymentGateway: NullableCopiableProp<String> = .copy
63+
preferredInPersonPaymentGateway: NullableCopiableProp<String> = .copy,
64+
skippedCodOnboardingStep: CopiableProp<Bool> = .copy
6465
) -> GeneralStoreSettings {
6566
let isTelemetryAvailable = isTelemetryAvailable ?? self.isTelemetryAvailable
6667
let telemetryLastReportedTime = telemetryLastReportedTime ?? self.telemetryLastReportedTime
6768
let areSimplePaymentTaxesEnabled = areSimplePaymentTaxesEnabled ?? self.areSimplePaymentTaxesEnabled
6869
let preferredInPersonPaymentGateway = preferredInPersonPaymentGateway ?? self.preferredInPersonPaymentGateway
70+
let skippedCodOnboardingStep = skippedCodOnboardingStep ?? self.skippedCodOnboardingStep
6971

7072
return GeneralStoreSettings(
7173
isTelemetryAvailable: isTelemetryAvailable,
7274
telemetryLastReportedTime: telemetryLastReportedTime,
7375
areSimplePaymentTaxesEnabled: areSimplePaymentTaxesEnabled,
74-
preferredInPersonPaymentGateway: preferredInPersonPaymentGateway
76+
preferredInPersonPaymentGateway: preferredInPersonPaymentGateway,
77+
skippedCodOnboardingStep: skippedCodOnboardingStep
7578
)
7679
}
7780
}

0 commit comments

Comments
 (0)