Skip to content

Commit a374c18

Browse files
authored
fix(shared): Remove billingEnabled gate from useStripeClerkLibs (#7639)
1 parent 76f548d commit a374c18

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.changeset/cute-hats-flow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@clerk/shared": patch
3+
---
4+
5+
Fix Stripe elements not loading by removing the `billingEnabled` gate from `useStripeClerkLibs`

packages/shared/src/react/billing/useStripeClerkLibs.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import type { loadStripe } from '@stripe/stripe-js';
22

33
import { defineKeepPreviousDataFn } from '../clerk-rq/keep-previous-data';
44
import { useClerkQuery } from '../clerk-rq/useQuery';
5-
import { useBillingHookEnabled } from '../hooks/useBillingHookEnabled';
65
import { useClerk } from '../hooks/useClerk';
76

87
type LoadStripeFn = typeof loadStripe;
@@ -19,15 +18,12 @@ export type UseStripeClerkLibsResult = StripeClerkLibs | null;
1918
function useStripeClerkLibs(): UseStripeClerkLibsResult {
2019
const clerk = useClerk();
2120

22-
const billingEnabled = useBillingHookEnabled();
23-
2421
const query = useClerkQuery({
2522
queryKey: ['clerk-stripe-sdk'],
2623
queryFn: async () => {
2724
const loadStripe = (await clerk.__internal_loadStripeJs()) as LoadStripeFn;
2825
return { loadStripe };
2926
},
30-
enabled: billingEnabled,
3127
staleTime: Infinity,
3228
refetchOnWindowFocus: false,
3329
placeholderData: defineKeepPreviousDataFn(true),

0 commit comments

Comments
 (0)