Skip to content
This repository was archived by the owner on Oct 16, 2025. It is now read-only.

Commit a3562b6

Browse files
committed
fix(hot): always return autoRenewPreference
1 parent 39fa9df commit a3562b6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Sources/Helpers/StoreKitTypesBridge.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,9 @@ enum StoreKitTypesBridge {
187187

188188
switch status.renewalInfo {
189189
case .verified(let info):
190-
let pendingProductId = (info.autoRenewPreference != transaction.productID) ? info.autoRenewPreference : nil
190+
// Always return autoRenewPreference as pendingUpgradeProductId
191+
// Client can compare with current productId to detect plan changes
192+
let pendingProductId = info.autoRenewPreference
191193
let offerInfo: (id: String?, type: String?)?
192194
#if swift(>=6.1)
193195
if #available(iOS 18.0, macOS 15.0, *) {
@@ -228,7 +230,9 @@ enum StoreKitTypesBridge {
228230
)
229231
return renewalInfo
230232
case .unverified(let info, _):
231-
let pendingProductId = (info.autoRenewPreference != transaction.productID) ? info.autoRenewPreference : nil
233+
// Always return autoRenewPreference as pendingUpgradeProductId
234+
// Client can compare with current productId to detect plan changes
235+
let pendingProductId = info.autoRenewPreference
232236
let offerInfo: (id: String?, type: String?)?
233237
#if swift(>=6.1)
234238
if #available(iOS 18.0, macOS 15.0, *) {

0 commit comments

Comments
 (0)