File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ const StatefulSubscribeButton = () => {
100100 }
101101 } ;
102102
103- // Refetch the checkout intent if the polled intent state changes .
103+ // Visually alter the Subscribe button to a "successful" appearance if the polled intent state becomes successful .
104104 useEffect ( ( ) => {
105105 if ( statefulButtonState === 'pending' && determineExistingSuccessfulCheckoutIntent ( polledCheckoutIntent ?. state ) ) {
106106 setStatefulButtonState ( 'success' ) ;
Original file line number Diff line number Diff line change @@ -160,15 +160,15 @@ async function billingDetailsSuccessLoader(queryClient: QueryClient): Promise<Re
160160 ) ;
161161 }
162162
163- const checkoutIntentType = checkoutFormStore . getState ( ) . checkoutSessionStatus ?. type ;
163+ const stripeCheckoutSessionType = checkoutFormStore . getState ( ) . checkoutSessionStatus ?. type ;
164164
165165 // Explicitly check that the intent is in a successful state
166166 // If the intent is successful but the type is not 'complete',
167167 // or if there is no existingSuccessfulCheckoutIntent flag,
168168 // redirect to Plan Details to restart the process.
169169 if (
170170 ! determineExistingSuccessfulCheckoutIntent ( checkoutIntent . state )
171- && checkoutIntentType !== 'complete'
171+ && stripeCheckoutSessionType !== 'complete'
172172 && ! checkoutIntent . existingSuccessfulCheckoutIntent
173173 ) {
174174 return redirect ( CheckoutPageRoute . PlanDetails ) ;
You can’t perform that action at this time.
0 commit comments