Skip to content

Commit f6d6b0c

Browse files
authored
Merge pull request #6164 from woocommerce/5976-improve-consistency-of-fetching-charge
[Mobile Payments] Display last4 and card brand on refund screen consistently
2 parents 0b39bea + 9b3296e commit f6d6b0c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Networking/Networking/Remote/OrdersRemote.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,13 @@ public extension OrdersRemote {
269269
private static let commonOrderFieldValues = [
270270
"id", "parent_id", "number", "status", "currency", "customer_id", "customer_note", "date_created_gmt", "date_modified_gmt", "date_paid_gmt",
271271
"discount_total", "discount_tax", "shipping_total", "shipping_tax", "total", "total_tax", "payment_method", "payment_method_title",
272-
"billing", "coupon_lines", "shipping_lines", "refunds", "fee_lines", "order_key", "tax_lines"
272+
"billing", "coupon_lines", "shipping_lines", "refunds", "fee_lines", "order_key", "tax_lines", "meta_data"
273273
]
274+
// Use with caution. Any fields in here will be overwritten with empty values by
275+
// `Order+ReadOnlyConvertible.swift: Order.update(with:)` when the list of orders is fetched.
276+
// See p91TBi-7yL-p2 for discussion.
274277
private static let singleOrderExtraFieldValues = [
275-
"line_items", "shipping", "meta_data"
278+
"line_items", "shipping"
276279
]
277280
}
278281

Yosemite/Yosemite/Model/Storage/Order+ReadOnlyConvertible.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ extension Storage.Order: ReadOnlyConvertible {
3232
totalTax = order.totalTax
3333
paymentMethodID = order.paymentMethodID
3434
paymentMethodTitle = order.paymentMethodTitle
35+
chargeID = order.chargeID
3536

3637
if let billingAddress = order.billingAddress {
3738
billingFirstName = billingAddress.firstName

0 commit comments

Comments
 (0)