mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Handled available Products based on prices
refs https://github.com/TryGhost/Team/issues/767 - takes into account available prices to decide if multiple products screen needs to be shown
This commit is contained in:
parent
d91cd4240e
commit
097dfe4452
1 changed files with 6 additions and 0 deletions
|
@ -141,6 +141,12 @@ export function hasMultipleProducts({site = {}}) {
|
|||
const {
|
||||
products = []
|
||||
} = site || {};
|
||||
if (site.portal_plans && !site.portal_plans.includes('monthly') && !site.portal_plans.includes('yearly')) {
|
||||
return false;
|
||||
}
|
||||
if (site.portal_products && site.portal_products.length < 2) {
|
||||
return false;
|
||||
}
|
||||
if (products?.length > 1) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue