diff --git a/apps/portal/src/components/common/ProductsSection.js b/apps/portal/src/components/common/ProductsSection.js index 4c7e43ea00..4c352631ec 100644 --- a/apps/portal/src/components/common/ProductsSection.js +++ b/apps/portal/src/components/common/ProductsSection.js @@ -947,6 +947,7 @@ function ProductsSection({onPlanSelect, products, type = null, handleChooseSignu const activeInterval = getActiveInterval({portalPlans, portalDefaultPlan, selectedInterval}); const isComplimentary = isComplimentaryMember({member}); + const hasOnlyFree = hasOnlyFreeProduct({site}); useEffect(() => { setSelectedProduct(defaultProductId); @@ -978,6 +979,11 @@ function ProductsSection({onPlanSelect, products, type = null, handleChooseSignu className += ' gh-portal-upgrade-product'; } + // If site doesn't have paid products then don't return an empty container + if (hasOnlyFree) { + return null; + } + let finalProduct = products.find(p => p.id === selectedProduct)?.id || products.find(p => p.type === 'paid')?.id; return (
- {(!(hasOnlyFreeProduct({site})) ? + {(!(hasOnlyFree) ?