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

Show notice to users on Pro and Starter plans #64478

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion client/my-sites/plans-features-main/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
isPremiumPlan,
isBusinessPlan,
isEcommercePlan,
isProPlan,
isStarterPlan,
planMatches,
TYPE_FREE,
TYPE_BLOGGER,
Expand Down Expand Up @@ -163,6 +165,7 @@ export class PlansFeaturesMain extends Component {
isJetpack,
isLandingPage,
isLaunchPage,
isCurrentPlanRetired,
onUpgradeClick,
selectedFeature,
selectedPlan,
Expand Down Expand Up @@ -191,7 +194,19 @@ export class PlansFeaturesMain extends Component {
) }
data-e2e-plans="wpcom"
>
{ currentPurchaseIsInAppPurchase && (
{ isCurrentPlanRetired && (
<Notice
showDismiss={ false }
status="is-info"
text={ translate(
'Your current plan is no longer available for new subscriptions. ' +
'You’re all set to continue with the plan for as long as you like. ' +
'Alternatively, you can switch to any of our current plans by selecting it below. ' +
'Please keep in mind that switching plans will be irreversible.'
) }
/>
) }
{ ! isCurrentPlanRetired && currentPurchaseIsInAppPurchase && (
<Notice
showDismiss={ false }
status="is-info"
Expand Down Expand Up @@ -531,6 +546,7 @@ export default connect(
}

return {
isCurrentPlanRetired: isProPlan( sitePlanSlug ) || isStarterPlan( sitePlanSlug ),
currentPurchaseIsInAppPurchase: currentPurchase?.isInAppPurchase,
customerType,
domains: getDomainsBySiteId( state, siteId ),
Expand Down