mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
Filtered selected prices in Portal settings
no refs Filters active prices in Portal settings to only contain the selected prices by site owner in new monthly/yearly price id settings, ignoring all other prices for now.
This commit is contained in:
parent
d9367f5b20
commit
2e8db93ab6
@ -89,9 +89,14 @@ const getDefaultProductPrices = async function () {
|
||||
const activePrices = prices.filter((d) => {
|
||||
return !!d.active;
|
||||
});
|
||||
const monthlyPriceId = settingsCache.get('members_monthly_price_id');
|
||||
const yearlyPriceId = settingsCache.get('members_yearly_price_id');
|
||||
const filteredPrices = activePrices.filter((d) => {
|
||||
return [monthlyPriceId, yearlyPriceId].includes(d.id);
|
||||
});
|
||||
return {
|
||||
product: productData,
|
||||
prices: activePrices
|
||||
prices: filteredPrices
|
||||
};
|
||||
}
|
||||
return {};
|
||||
|
Loading…
Reference in New Issue
Block a user