0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Updated @price data to not use archived prices

no-issue

Since we now allow archiving prices, we should filter them out from
being considered the monthly or yearly plan, as they are unable to be
subscribed to.
This commit is contained in:
Fabien O'Carroll 2021-05-12 14:28:54 +01:00
parent 22a211f1de
commit 3483bfa747

View file

@ -76,7 +76,11 @@ async function haxGetMembersPriceData() {
const defaultProduct = products[0];
const nonZeroPrices = defaultProduct.stripe_prices.filter((price) => {
const activePrices = defaultProduct.stripe_prices.filter((price) => {
return price.active;
});
const nonZeroPrices = activePrices.filter((price) => {
return price.amount !== 0;
});