Also show upgrade message and link if key is valid without premium
[MAILPOET-5938]
This commit is contained in:
committed by
Aschepikov
parent
28b67db92b
commit
f96e6b83d6
@ -86,15 +86,19 @@ export function PremiumBannerWithUpgrade({
|
||||
|
||||
ctaButton = getCtaButton(__('Upgrade your plan', 'mailpoet'), link);
|
||||
} else if (
|
||||
hasValidPremiumKey &&
|
||||
capabilityName &&
|
||||
MailPoet.capabilities[capabilityName].isRestricted
|
||||
(hasValidApiKey && !hasValidPremiumKey) || // ex. Starter plan
|
||||
(hasValidPremiumKey &&
|
||||
capabilityName &&
|
||||
MailPoet.capabilities[capabilityName].isRestricted)
|
||||
) {
|
||||
title = __('Upgrade your plan', 'mailpoet');
|
||||
bannerMessage = message;
|
||||
const upgradeParams = capabilityName
|
||||
? { capability: capabilityName, s: subscribersCount }
|
||||
: {};
|
||||
const link = MailPoet.MailPoetComUrlFactory.getUpgradeUrl(
|
||||
pluginPartialKey,
|
||||
{ capability: capabilityName, s: subscribersCount },
|
||||
upgradeParams,
|
||||
);
|
||||
ctaButton = getCtaButton(__('Upgrade', 'mailpoet'), link);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user