diff --git a/apps/portal/package.json b/apps/portal/package.json index 0e7c33b7dd3..bfeb6c41f32 100644 --- a/apps/portal/package.json +++ b/apps/portal/package.json @@ -1,6 +1,6 @@ { "name": "@tryghost/portal", - "version": "2.68.17", + "version": "2.68.18", "license": "MIT", "repository": "https://github.com/TryGhost/Ghost", "author": "Ghost Foundation", diff --git a/apps/portal/src/components/pages/AccountHomePage/components/continue-gift-subscription-banner.js b/apps/portal/src/components/pages/AccountHomePage/components/continue-gift-subscription-banner.js index 2a57838c0f4..8af8b5585fd 100644 --- a/apps/portal/src/components/pages/AccountHomePage/components/continue-gift-subscription-banner.js +++ b/apps/portal/src/components/pages/AccountHomePage/components/continue-gift-subscription-banner.js @@ -1,12 +1,12 @@ import AppContext from '../../../../app-context'; import ActionButton from '../../../common/action-button'; -import {getSubscriptionExpiry, isGiftMember} from '../../../../utils/helpers'; +import {getSubscriptionExpiry, isArchivedTier, isGiftMember} from '../../../../utils/helpers'; import {useContext} from 'react'; const ContinueGiftSubscriptionBanner = () => { - const {member, doAction, action, brandColor} = useContext(AppContext); + const {member, site, doAction, action, brandColor} = useContext(AppContext); - if (!isGiftMember({member})) { + if (!isGiftMember({member}) || isArchivedTier({member, site})) { return null; } diff --git a/apps/portal/src/components/pages/AccountHomePage/components/paid-account-actions.js b/apps/portal/src/components/pages/AccountHomePage/components/paid-account-actions.js index 9b7dc75e123..88032927d79 100644 --- a/apps/portal/src/components/pages/AccountHomePage/components/paid-account-actions.js +++ b/apps/portal/src/components/pages/AccountHomePage/components/paid-account-actions.js @@ -1,5 +1,5 @@ import AppContext from '../../../../app-context'; -import {getSubscriptionExpiry, getMemberSubscription, getMemberTierName, hasMultipleProductsFeature, hasOnlyFreePlan, isComplimentaryMember, isGiftMember, isPaidMember, subscriptionHasFreeTrial} from '../../../../utils/helpers'; +import {getSubscriptionExpiry, getMemberSubscription, getMemberTierName, hasMultipleProductsFeature, hasOnlyFreePlan, isArchivedTier, isComplimentaryMember, isGiftMember, isPaidMember, subscriptionHasFreeTrial} from '../../../../utils/helpers'; import {getDateString} from '../../../../utils/date-time'; import {ReactComponent as GiftIcon} from '../../../../images/icons/gift.svg'; import {ReactComponent as LoaderIcon} from '../../../../images/icons/loader.svg'; @@ -97,10 +97,21 @@ const PaidAccountActions = () => { }; const PlanUpdateButton = ({isPaid}) => { - if (hasOnlyFreePlan({site}) && !isPaid) { + const hasGiftSubscription = isGiftMember({member}); + const canContinueGiftSubscription = hasGiftSubscription && !isArchivedTier({member, site}); + + // If no paid tiers are available, hide the plan update button for: + // - Free members, as they have no paid plans to upgrade to + // - Gift members on archived tiers, as they have no paid plans to upgrade to + // + // In constrast, still render the button for: + // - Paid members so that they can adjust the cadence on their existing sub + // - Comped members so that they can contact publishers to make changes to their complimentary access + if (hasOnlyFreePlan({site}) && (!isPaid || (hasGiftSubscription && !canContinueGiftSubscription))) { return null; } - if (isGiftMember({member})) { + + if (canContinueGiftSubscription) { return (