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);
|
ctaButton = getCtaButton(__('Upgrade your plan', 'mailpoet'), link);
|
||||||
} else if (
|
} else if (
|
||||||
hasValidPremiumKey &&
|
(hasValidApiKey && !hasValidPremiumKey) || // ex. Starter plan
|
||||||
capabilityName &&
|
(hasValidPremiumKey &&
|
||||||
MailPoet.capabilities[capabilityName].isRestricted
|
capabilityName &&
|
||||||
|
MailPoet.capabilities[capabilityName].isRestricted)
|
||||||
) {
|
) {
|
||||||
title = __('Upgrade your plan', 'mailpoet');
|
title = __('Upgrade your plan', 'mailpoet');
|
||||||
bannerMessage = message;
|
bannerMessage = message;
|
||||||
|
const upgradeParams = capabilityName
|
||||||
|
? { capability: capabilityName, s: subscribersCount }
|
||||||
|
: {};
|
||||||
const link = MailPoet.MailPoetComUrlFactory.getUpgradeUrl(
|
const link = MailPoet.MailPoetComUrlFactory.getUpgradeUrl(
|
||||||
pluginPartialKey,
|
pluginPartialKey,
|
||||||
{ capability: capabilityName, s: subscribersCount },
|
upgradeParams,
|
||||||
);
|
);
|
||||||
ctaButton = getCtaButton(__('Upgrade', 'mailpoet'), link);
|
ctaButton = getCtaButton(__('Upgrade', 'mailpoet'), link);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user