@@ -16,12 +16,10 @@ import {
1616 EmptyMedia ,
1717 EmptyTitle ,
1818} from "@posthog/quill" ;
19- import { BILLING_FLAG } from "@posthog/shared" ;
2019import { ANALYTICS_EVENTS } from "@posthog/shared/analytics-events" ;
2120import { useAuthStateValue } from "@posthog/ui/features/auth/store" ;
2221import { UsageMeter } from "@posthog/ui/features/billing/UsageMeter" ;
2322import { useUsage } from "@posthog/ui/features/billing/useUsage" ;
24- import { useFeatureFlag } from "@posthog/ui/features/feature-flags/useFeatureFlag" ;
2523import { SpendAnalysisSection } from "@posthog/ui/features/usage/components/SpendAnalysisSection" ;
2624import { useSpendAnalysisEnabled } from "@posthog/ui/features/usage/useSpendAnalysisEnabled" ;
2725import { useTrackUsageViewed } from "@posthog/ui/features/usage/useTrackUsageViewed" ;
@@ -30,14 +28,8 @@ import { getBillingUrl } from "@posthog/ui/utils/urls";
3028import { Badge , Button , Callout , Flex , Spinner , Text } from "@radix-ui/themes" ;
3129import { useEffect } from "react" ;
3230
33- /**
34- * Plan & usage under usage-based billing: no seats or plans to manage in-app —
35- * payment methods, spend limits, and org-level usage live on the PostHog
36- * billing page. The free-tier meters show the per-user allowance for
37- * confirmed free-tier orgs; subscribed orgs have no per-user caps to meter.
38- */
3931export function PlanUsageSettings ( ) {
40- const billingEnabled = useFeatureFlag ( BILLING_FLAG ) ;
32+ const billingEnabled = true ;
4133 const spendAnalysisEnabled = useSpendAnalysisEnabled ( ) ;
4234 const cloudRegion = useAuthStateValue ( ( state ) => state . cloudRegion ) ;
4335 const billingUrl = getBillingUrl ( cloudRegion ) ;
@@ -52,7 +44,7 @@ export function PlanUsageSettings() {
5244 // refetchUsage is a refresh mutation, so it bypasses useUsage's `enabled`
5345 // gate — skip it for spend-only users.
5446 if ( billingEnabled ) void refetchUsage ( ) ;
55- } , [ refetchUsage , billingEnabled ] ) ;
47+ } , [ refetchUsage ] ) ;
5648
5749 useTrackUsageViewed ( {
5850 isLoading : billingEnabled && usageLoading ,
@@ -66,7 +58,6 @@ export function PlanUsageSettings() {
6658 const subscribed = usage ?. code_usage_subscribed === true ;
6759 const orgLimitReached = usage ?. ai_credits ?. exhausted === true ;
6860 const meter = codeUsageMeter ( usage ) ;
69- const usageIsPerUser = meter . kind === "bucket" ;
7061
7162 const openBilling = ( ) => {
7263 if ( billingUrl ) window . open ( billingUrl , "_blank" ) ;
@@ -164,16 +155,9 @@ export function PlanUsageSettings() {
164155 </ Flex >
165156
166157 < Flex direction = "column" gap = "3" >
167- < Flex direction = "column" gap = "1" >
168- < Text className = "font-medium text-(--gray-9) text-sm" >
169- { usageIsPerUser ? "Your usage" : "Organization usage" }
170- </ Text >
171- < Text className = "text-(--gray-11) text-[13px]" >
172- { usageIsPerUser
173- ? "Your personal free-tier allowance for this period."
174- : "Usage-based billing shared across your whole organization." }
175- </ Text >
176- </ Flex >
158+ < Text className = "font-medium text-(--gray-9) text-sm" >
159+ Organization usage
160+ </ Text >
177161 { usageLoading ? (
178162 < Flex
179163 align = "center"
0 commit comments