@automattic/calypso-products
Version:
This module contains information about the various products sold within calypso, such as product slugs, plan intervals, etc.
11 lines • 673 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = isJetpackLegacyTermUpgrade;
const constants_1 = require("./constants");
function isJetpackLegacyTermUpgrade(itemSlug, upgradeFrom) {
// If the item the user is upgrading to is a yearly plan and they already have a monthly legacy plan
// This is not perfect since it does not check if the monthly and yearly plan are of the same type, but it will cover most cases
return (constants_1.JETPACK_YEARLY_LEGACY_PLANS.includes(itemSlug) &&
constants_1.JETPACK_MONTHLY_LEGACY_PLANS.includes(upgradeFrom));
}
//# sourceMappingURL=is-jetpack-legacy-term-upgrade.js.map