Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions app/api/stripe/session/create/route.ts

This file was deleted.

3 changes: 0 additions & 3 deletions hooks/useSubscribeClick.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useUserProvider } from "@/providers/UserProvder";
import { usePaymentProvider } from "@/providers/PaymentProvider";
import createClientPortalSession from "@/lib/stripe/createClientPortalSession";
import createClientCheckoutSession from "@/lib/stripe/createClientCheckoutSession";

const useSubscribeClick = () => {
const { userData } = useUserProvider();
Expand All @@ -12,9 +11,7 @@ const useSubscribeClick = () => {

if (isSubscribed) {
createClientPortalSession(userData.account_id);
return;
}
Comment on lines 12 to 14

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore checkout flow for unsubscribed users

handleClick now only opens the billing portal when isSubscribed is true, and performs no action for unsubscribed accounts. This breaks both visible upgrade entry points (Start Free Trial and dropdown Subscribe) because they still call this hook, so non-paying users cannot start a Stripe checkout session anymore.

Useful? React with 👍 / 👎.

createClientCheckoutSession(userData.account_id);
};

return {
Expand Down
21 changes: 0 additions & 21 deletions lib/stripe/createClientCheckoutSession.ts

This file was deleted.

30 changes: 0 additions & 30 deletions lib/stripe/createSession.ts

This file was deleted.

Loading