mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
Fixed upgrades for paid members (#15760)
closes https://github.com/TryGhost/Team/issues/2202 Some parts of the codebase were not using the isSameCurrency helper which meant that we were incorrectly filtering out tiers from the upgrade screen. Tiers used to *usually* have a lowercased currency property, but they now _always_ have an uppercased.
This commit is contained in:
parent
0bccbcb083
commit
f9c31dd902
@ -105,13 +105,13 @@ export function getUpgradeProducts({site, member}) {
|
||||
return availableProducts;
|
||||
}
|
||||
return availableProducts.filter((product) => {
|
||||
return (getProductCurrency({product}) === activePriceCurrency);
|
||||
return (isSameCurrency(getProductCurrency({product}), activePriceCurrency));
|
||||
});
|
||||
}
|
||||
|
||||
export function getFilteredPrices({prices, currency}) {
|
||||
return prices.filter((d) => {
|
||||
return (d.currency || '').toLowerCase() === (currency || '').toLowerCase();
|
||||
return isSameCurrency((d.currency || ''), (currency || ''));
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user