Filter changePlans path for expired subscriptions in CustomerCenter#6814
Merged
Conversation
An expired subscription should not offer the "change plans" option — there is no active plan to switch from. Adds `isExpired` to the existing `changePlans` guard alongside `isLifetime`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
bilqisium
approved these changes
May 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Expired subscriptions should not surface the "Change Plans" option in Customer Center — there is no active plan to switch from.
The
relevantPathsfilter already guarded.changePlansfor lifetime and non-App Store subscriptions, but had no check forisExpired. This caused the Change Plans help path to appear whenever an expired App Store subscription was loaded (e.g. vialoadMostRecentExpiredTransaction).Discovered while reviewing #6809, which exposed the gap.
Description
Adds
|| purchaseInformation.isExpiredto the existing.changePlansguard inCustomerCenterConfigData.HelpPath+PurchaseInformation.swift, and updates the comment from "not a subscription" to "not an active subscription" to reflect all three conditions.Test plan
testAutoRenewableSubscriptionDoesNotShowChangePlansIfExpired— regression test alongside the existingtestAutoRenewableSubscriptionDoesNotShowChangePlansIfLifetimeBaseManageSubscriptionViewModelTestscontinue to passNotes
configuration.changePlansfor expired transactions — that change is safe only once expired subs can't show the Change Plans button)CHANGE_PLANSat all yet, so there is no cross-platform reference to check🤖 Generated with Claude Code
Note
Low Risk
Low risk: a narrow UI/help-path filtering tweak that only affects when
.changePlansis shown, covered by a new regression test.Overview
Prevents Customer Center from surfacing the Change Plans help path for expired App Store renewable subscriptions by adding an
isExpiredguard to the existing.changePlansfilter.Adds a regression test (
testAutoRenewableSubscriptionDoesNotShowChangePlansIfExpired) to ensure expired subscriptions no longer include.changePlansinrelevantPathsForPurchase.Reviewed by Cursor Bugbot for commit bbcf66e. Bugbot is set up for automated code reviews on this repo. Configure here.