From 618c886b7a0d570a285a653547f7abdb846b3b5c Mon Sep 17 00:00:00 2001 From: abhigyanghosh30 Date: Wed, 4 Oct 2023 23:38:14 +0530 Subject: [PATCH] albert's suggested fix --- .../subscribe/checkout/components/Checkout/Checkout.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/static/js/src/advantage/subscribe/checkout/components/Checkout/Checkout.tsx b/static/js/src/advantage/subscribe/checkout/components/Checkout/Checkout.tsx index ab6d4da7a1a..a8d83483ba4 100644 --- a/static/js/src/advantage/subscribe/checkout/components/Checkout/Checkout.tsx +++ b/static/js/src/advantage/subscribe/checkout/components/Checkout/Checkout.tsx @@ -67,7 +67,12 @@ const Checkout = ({ product, quantity, action }: Props) => { {}} initialValues={initialValues} - enableReinitialize={!!userInfo?.customerInfo?.address?.country} + enableReinitialize={ + (!!userInfo?.customerInfo?.address?.country && + action === "renewal") || + (!!userInfo?.customerInfo?.defaultPaymentMethod && + action === "purchase") + } > <>