Skip to content

💡 Added a link to manage paid subscriptions on the newsletter unsubscribe#28780

Open
Aubaid12 wants to merge 1 commit into
TryGhost:mainfrom
Aubaid12:fix/23445-manage-subscription-on-unsubscribe
Open

💡 Added a link to manage paid subscriptions on the newsletter unsubscribe#28780
Aubaid12 wants to merge 1 commit into
TryGhost:mainfrom
Aubaid12:fix/23445-manage-subscription-on-unsubscribe

Conversation

@Aubaid12

Copy link
Copy Markdown

Refs #23445

On the newsletter unsubscribe page, paid members just see the greyed-out note that unsubscribing won't cancel their paid subscription. There's no link to actually do anything about it, so if someone wants to manage or cancel their subscription they're stuck.

This adds a "Manage your paid subscription" link under that note for paid members. If they're logged in it takes them to their account; if they're not (e.g. coming from an email link) it sends them to sign in first, since the account pages need auth. Free members don't see the link.

I used the "Manage your paid subscription" wording from cathysarisky's suggestion in the issue, and kept the existing note rather than turning it into a one-click cancel (per 9larsons' comment that it shouldn't be framed as making cancellation easier).

Added tests for the three cases (free = no link, paid logged-out = sign in, paid logged-in = account) and checked it manually on a local build.

  • I've read and followed the Contributor Guide
  • I've explained my change
  • I've written an automated test to prove my change works
pic-after-click-signin pic-fixed-paid-member

…ribe page

ref TryGhost#23445

Paid members opening the newsletter unsubscribe page previously saw only greyed-out text saying it won't cancel their paid subscription, with no way to act on it. This adds a clear 'Manage your paid subscription' link for paid members, routing logged-in members to their account and logged-out members to sign in first.
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 837d0e57-32e9-4138-a338-beeb848b73be

📥 Commits

Reviewing files that changed from the base of the PR and between 3ebe909 and 4d1636f.

📒 Files selected for processing (3)
  • apps/portal/src/components/common/newsletter-management.js
  • apps/portal/test/email-subscriptions-flow.test.js
  • ghost/i18n/locales/en/portal.json

Walkthrough

ShowPaidMemberMessage in newsletter-management.js is refactored to return null for non-paid members and render a two-paragraph block with a "Manage your paid subscription" button for paid members. The button is wired to a new onManageSubscription prop. NewsletterManagement supplies this prop via a handler that calls doAction('switchPage', 'accountHome') when a member object is present or doAction('switchPage', 'signin') otherwise. A new i18n key "Manage your paid subscription" is added to ghost/i18n/locales/en/portal.json. Three new test cases in email-subscriptions-flow.test.js verify: free members see no manage-subscription link; logged-out paid members are routed to sign-in; and logged-in paid members are routed to "Your account".

Possibly related issues

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding a link to manage paid subscriptions on the newsletter unsubscribe page, which matches the core functionality implemented across the changeset.
Description check ✅ Passed The description is directly related to the changeset, providing clear context about the problem, solution, implementation details, testing approach, and includes supporting screenshots demonstrating the feature.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant