Skip to content

Filter changePlans path for expired subscriptions in CustomerCenter#6814

Merged
facumenzella merged 1 commit into
mainfrom
fix/customer-center-change-plans-expired
May 18, 2026
Merged

Filter changePlans path for expired subscriptions in CustomerCenter#6814
facumenzella merged 1 commit into
mainfrom
fix/customer-center-change-plans-expired

Conversation

@facumenzella

@facumenzella facumenzella commented May 18, 2026

Copy link
Copy Markdown
Member

Motivation

Expired subscriptions should not surface the "Change Plans" option in Customer Center — there is no active plan to switch from.

The relevantPaths filter already guarded .changePlans for lifetime and non-App Store subscriptions, but had no check for isExpired. This caused the Change Plans help path to appear whenever an expired App Store subscription was loaded (e.g. via loadMostRecentExpiredTransaction).

Discovered while reviewing #6809, which exposed the gap.

Description

Adds || purchaseInformation.isExpired to the existing .changePlans guard in CustomerCenterConfigData.HelpPath+PurchaseInformation.swift, and updates the comment from "not a subscription" to "not an active subscription" to reflect all three conditions.

Test plan

  • Added testAutoRenewableSubscriptionDoesNotShowChangePlansIfExpired — regression test alongside the existing testAutoRenewableSubscriptionDoesNotShowChangePlansIfLifetime
  • All existing BaseManageSubscriptionViewModelTests continue to pass

Notes

🤖 Generated with Claude Code


Note

Low Risk
Low risk: a narrow UI/help-path filtering tweak that only affects when .changePlans is 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 isExpired guard to the existing .changePlans filter.

Adds a regression test (testAutoRenewableSubscriptionDoesNotShowChangePlansIfExpired) to ensure expired subscriptions no longer include .changePlans in relevantPathsForPurchase.

Reviewed by Cursor Bugbot for commit bbcf66e. Bugbot is set up for automated code reviews on this repo. Configure here.

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>
@facumenzella facumenzella merged commit 56c24ee into main May 18, 2026
18 of 22 checks passed
@facumenzella facumenzella deleted the fix/customer-center-change-plans-expired branch May 18, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants