Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fixed incorrect member subscription details in Admin #20476

Merged
merged 4 commits into from
Jul 2, 2024
Merged

Conversation

allouis
Copy link
Contributor

@allouis allouis commented Jun 27, 2024

fixes https://linear.app/tryghost/issue/ENG-642

  • When a subscription is in the canceled state the corresponding Member has no access to the Ghost site. The only time a Member will continue to have access if their subscription is due to cancel at the period end is if it is still in an active state, which is one of active trialing unpaid or past_due
  • When a subscription is canceled immediately (i.e. before the end of the current billing period), we now render "Ended" without a date, because we don't store the cancellation date in the subscription object. We previously used "Ended {current_period_end}" which would sometimes lead to dates in the future
  • Bonus: refactored code and added unit tests

ref https://linear.app/tryghost/issue/ENG-642

When a subscription is in the `canceled` state the corresponding Member has no access to the Ghost site. The only time a Member will continue to have access if their subscription is due to cancel at the period end is if it is still in an active state, which is one of `active` `trialing` `unpaid` or `past_due`
@github-actions github-actions bot added the affects:admin Anything relating to Ghost Admin label Jun 27, 2024
@allouis
Copy link
Contributor Author

allouis commented Jun 27, 2024

@ronaldlangeveld This might be useful - I haven't tested this, and ideally we would use different properties here, e.g. hasAccess and switch on that instead - but I believe the fix is along these lines.

@sagzy sagzy changed the title 🐛 Fixed incorrect "Has access until.." message 🐛 Fixed incorrect "Has access until..." / "Ended..." subscription details in Admin Jul 2, 2024
@sagzy sagzy changed the title 🐛 Fixed incorrect "Has access until..." / "Ended..." subscription details in Admin 🐛 Fixed incorrect member subscription details in Admin Jul 2, 2024
@sagzy sagzy enabled auto-merge (squash) July 2, 2024 13:53
@sagzy sagzy merged commit a4107b8 into main Jul 2, 2024
19 checks passed
@sagzy sagzy deleted the ENG-642 branch July 2, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:admin Anything relating to Ghost Admin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants