From 90e83960f6f7aa7bfe8a966899844db546deb335 Mon Sep 17 00:00:00 2001 From: M Fahru Date: Tue, 28 Jun 2022 09:36:35 -0400 Subject: [PATCH] Fix switch tooltip not showing the proper text on new plans page (#8608) GitOrigin-RevId: efb49c7a6045b6a5b26a0b0d84a24d151f76f192 --- .../pages/user/subscription/plans-v2/plans-v2-m-a-switch.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/web/frontend/js/pages/user/subscription/plans-v2/plans-v2-m-a-switch.js b/services/web/frontend/js/pages/user/subscription/plans-v2/plans-v2-m-a-switch.js index a02efec199..351a1e1cf4 100644 --- a/services/web/frontend/js/pages/user/subscription/plans-v2/plans-v2-m-a-switch.js +++ b/services/web/frontend/js/pages/user/subscription/plans-v2/plans-v2-m-a-switch.js @@ -24,6 +24,11 @@ export function switchMonthlyAnnual(currentMonthlyAnnualSwitchValue) { currentMonthlyAnnualSwitchValue === 'annual' ) + document.querySelectorAll('[data-ol-tooltip-period]').forEach(el => { + const period = el.getAttribute('data-ol-tooltip-period') + el.hidden = period !== currentMonthlyAnnualSwitchValue + }) + document .querySelectorAll('[data-ol-plans-v2-table-annual-price-before-discount]') .forEach(el => {