File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
Networking/Networking/Model
WooCommerce/Classes/Model Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ extension OrderStatus: RawRepresentable {
6464extension OrderStatus : CustomStringConvertible {
6565
6666 /// Returns a string describing the current OrderStatus Instance
67+ /// Custom doesn't return a localized string because the payload arrives at runtime, not buildtime.
6768 ///
6869 public var description : String {
6970 switch self {
@@ -74,7 +75,10 @@ extension OrderStatus: CustomStringConvertible {
7475 case . cancelled: return NSLocalizedString ( " Canceled " , comment: " Cancelled Order Status " )
7576 case . completed: return NSLocalizedString ( " Completed " , comment: " Completed Order Status " )
7677 case . refunded: return NSLocalizedString ( " Refunded " , comment: " Refunded Order Status " )
77- case . custom( let payload) : return NSLocalizedString ( " \( payload) " , comment: " Custom Order Status " )
78+ case . custom( let payload) :
79+ return payload
80+ . replacingOccurrences ( of: " - " , with: " " )
81+ . capitalized
7882 }
7983 }
8084}
Original file line number Diff line number Diff line change @@ -15,12 +15,6 @@ extension Order {
1515 return NSLocale ( localeIdentifier: identifier) . currencySymbol
1616 }
1717
18- /// Determines if a shipping address exists.
19- ///
20- var hasSeparateShippingDetail : Bool {
21- return shippingAddress != nil
22- }
23-
2418 /// FIXME: Creates an empty-string value Billing details, until i6 fix
2519 ///
2620 func generateEmptyBillingAddress( ) -> Address {
You can’t perform that action at this time.
0 commit comments