@automattic/calypso-products
Version:
This module contains information about the various products sold within calypso, such as product slugs, plan intervals, etc.
8 lines • 586 B
JavaScript
import { JETPACK_MONTHLY_LEGACY_PLANS, JETPACK_YEARLY_LEGACY_PLANS } from './constants';
export default 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 (JETPACK_YEARLY_LEGACY_PLANS.includes(itemSlug) &&
JETPACK_MONTHLY_LEGACY_PLANS.includes(upgradeFrom));
}
//# sourceMappingURL=is-jetpack-legacy-term-upgrade.js.map