[Billing Plans]: Use total commitment price for StoreProduct.price when representing a billing plan#6910
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2e2e697. Configure here.
| } else { | ||
| return self.product.price | ||
| } | ||
| } |
There was a problem hiding this comment.
pricePerMonth inflates billing plans
Medium Severity
On iOS 26.4+, when installmentsInfo is set, StoreProduct.price now returns the full commitment total, but pricePerMonth (and the other pricePer* helpers) still divide that value by subscriptionPeriod, which is typically one billing cycle. Monthly installment products then show roughly the full commitment as the “per month” amount instead of the per-installment price, breaking paywall comparisons and product.price_per_month display.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 2e2e697. Configure here.
There was a problem hiding this comment.
This isn't an issue because subscriptionPeriod on the store product is equal to the product's duration, which is still 1 year, even for products with 12 month commitments.


Description
This PR modifies
StoreProduct.priceto return the billing plan's total commitment price when a product represents a billing plan. Previously, this returned the product's price (upFront price), which is often the same as a monthly commitment's total price, but can differ in some cases.Note
Medium Risk
Changes the public
pricevalue for billing-plan products on iOS 26.4+, which can affect pricing display and derived per-period calculations that useprice.Overview
On iOS 26.4+, when a
StoreProducthasinstallmentsInfo(billing-plan product),pricenow returnscommitmentTotalPriceinstead of the underlying StoreKit up-front price. Without installments info, or on older OS versions, behavior is unchanged and still usesproduct.price.Unit tests cover the nil-installments case, pre-26.4 behavior even if installments data is present, and the 26.4+ commitment-total path. Test helpers accept an explicit
priceand optionalcommitmentTotalPricefor fixtures.Reviewed by Cursor Bugbot for commit 2e2e697. Bugbot is set up for automated code reviews on this repo. Configure here.