Removed Archived Tiers from Portal settings

refs https://github.com/TryGhost/Team/issues/1252

Archived Tiers are no longer able to be signed up to, and should not be
shown in Portal
This commit is contained in:
Fabien "egg" O'Carroll 2022-01-24 12:12:15 +02:00
parent 065cac4914
commit 9c139a78e4
2 changed files with 2 additions and 1 deletions

View File

@ -72,7 +72,7 @@ export default ModalComponent.extend({
return (this.membersUtils.isStripeEnabled && allowedPlans.includes('yearly'));
}),
products: computed('model.products.[]', 'settings.portalProducts.[]', 'isPreloading', function () {
const paidProducts = this.model.products?.filter(product => product.type === 'paid');
const paidProducts = this.model.products?.filter(product => product.type === 'paid' && product.active === true);
if (this.isPreloading || !paidProducts?.length) {
return [];
}

View File

@ -6,6 +6,7 @@ export default Model.extend(ValidationEngine, {
name: attr('string'),
description: attr('string'),
active: attr('boolean'),
slug: attr('string'),
type: attr('string', {defaultValue: 'paid'}),
monthlyPrice: attr('stripe-price'),