From f9c31dd902b98ee1813d180feeec8234aa0afe9f Mon Sep 17 00:00:00 2001 From: Fabien 'egg' O'Carroll Date: Thu, 3 Nov 2022 09:45:34 +0700 Subject: [PATCH] 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. --- ghost/portal/src/utils/helpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghost/portal/src/utils/helpers.js b/ghost/portal/src/utils/helpers.js index 90beba46c3..90e773e247 100644 --- a/ghost/portal/src/utils/helpers.js +++ b/ghost/portal/src/utils/helpers.js @@ -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 || '')); }); }