Skip to content

Dashboard: Show expired plan banner and disable Manage store for CIAB sites#109632

Open
valterlorran wants to merge 4 commits intotrunkfrom
fix/ciab-expired-plan-banner
Open

Dashboard: Show expired plan banner and disable Manage store for CIAB sites#109632
valterlorran wants to merge 4 commits intotrunkfrom
fix/ciab-expired-plan-banner

Conversation

@valterlorran
Copy link
Copy Markdown
Contributor

@valterlorran valterlorran commented Mar 26, 2026

Proposed Changes

  • Add a warning banner on the CIAB site overview when the plan has expired, showing the grace period deadline (expiry date + 30 days) and a "Get a plan" CTA linking to the Woo hosted plans page.
  • Disable the "Manage store" button when the CIAB plan is expired.
Captura de Tela 2026-03-26 às 17 43 11

Why are these changes being made?

When a CIAB site's plan expires, users need a clear indication that their store is no longer active and a path to reactivate it before permanent deletion. The disabled button prevents navigating to a non-functional store admin.

Testing Instructions

  • Navigate to a CIAB site overview with an expired plan (e.g., /sites/<slug>).
  • Verify the yellow warning banner appears with the title "Plan expired" and the message includes a date 30 days after the plan's expiry date.
  • Verify the "Get a plan" button in the banner links to /setup/woo-hosted-plans.
  • Verify the "Manage store" header button is disabled.
  • Verify that CIAB sites with active plans still show the enabled "Manage store" button and no banner.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@valterlorran valterlorran requested a review from a team March 26, 2026 20:47
@valterlorran valterlorran self-assigned this Mar 26, 2026
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Mar 26, 2026
@matticbot
Copy link
Copy Markdown
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • help-center
  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug fix/ciab-expired-plan-banner on your sandbox.

@valterlorran valterlorran marked this pull request as ready for review March 27, 2026 02:56
@valterlorran valterlorran requested a review from a team as a code owner March 27, 2026 02:56
Copy link
Copy Markdown
Member

@atanas-dev atanas-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but there's a small case that's not handled

dashboard: getCurrentDashboard(),
} );

const gracePeriodDate = purchase?.expiry_date
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems dangerous to hardcode the grace period logic here 🤔 I feel this should use / be consolidated with the logic in

https://github.com/Automattic/wp-calypso/blob/71273113b980cb1d42a0317cf5186e0fa014692d/client/dashboard/utils/purchase.ts

cc: @Automattic/shilling ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I was planning to improve this in a next iteration, but I will check the file you mentioned.

…or CIAB sites

When a CIAB site's plan expires, show a warning banner in the site
overview with the grace period deadline (expiry + 30 days) and a
Get a plan CTA. The Manage store button is also disabled.
@valterlorran valterlorran force-pushed the fix/ciab-expired-plan-banner branch from da70136 to 18ace01 Compare March 30, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants