diff --git a/services/web/app/src/Features/Subscription/PlansHelper.js b/services/web/app/src/Features/Subscription/PlansHelper.js new file mode 100644 index 0000000000..527ed2ed6d --- /dev/null +++ b/services/web/app/src/Features/Subscription/PlansHelper.js @@ -0,0 +1,15 @@ +const FeaturesHelper = require('./FeaturesHelper') +const PlanLocator = require('./PlansLocator') + +function isProfessionalPlan(planCode) { + const plan = PlanLocator.findLocalPlanInSettings(planCode) + // only identify "modern" professional group plans as eligible, and do not include legacy plans + return Boolean( + planCode?.includes('professional') && + FeaturesHelper.getMatchedFeatureSet(plan?.features) === 'professional' + ) +} + +module.exports = { + isProfessionalPlan, +}