Skip to content

Commit 00c748e

Browse files
Update: Add inline documentation
1 parent 70bb55e commit 00c748e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

WordPressKit/TransactionsServiceRemote.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,12 @@ public enum TransactionsServiceProduct {
151151

152152
public struct CartResponse {
153153
let blogID: Int
154-
let cartKey: Any
154+
let cartKey: Any // cart key can be either Int or String
155155
let products: [Product]
156156

157157
init?(jsonDictionary: [String: AnyObject]) {
158158
guard
159-
let cartKey = jsonDictionary["cart_key"] as? Any,
159+
let cartKey = jsonDictionary["cart_key"],
160160
let blogID = jsonDictionary["blog_id"] as? Int,
161161
let products = jsonDictionary["products"] as? [[String: AnyObject]]
162162
else {

0 commit comments

Comments
 (0)