diff --git a/packages/clerk-js/src/core/clerk.ts b/packages/clerk-js/src/core/clerk.ts
index e41c21f3dae..701d5e80e31 100644
--- a/packages/clerk-js/src/core/clerk.ts
+++ b/packages/clerk-js/src/core/clerk.ts
@@ -1158,14 +1158,6 @@ export class Clerk implements ClerkInterface {
}
return;
}
- // Temporary backward compatibility for legacy prop: `forOrganizations`. Will be removed in the coming minor release.
- const nextProps = { ...(props as any) } as PricingTableProps & { forOrganizations?: boolean };
- if (typeof (props as any)?.forOrganizations !== 'undefined') {
- logger.warnOnce(
- 'Clerk: [IMPORTANT] prop `forOrganizations` is deprecated and will be removed in the coming minors. Use `for="organization"` instead.',
- );
- }
-
this.assertComponentsReady(this.#clerkUi);
const component = 'PricingTable';
void this.#clerkUi
@@ -1175,11 +1167,11 @@ export class Clerk implements ClerkInterface {
name: component,
appearanceKey: 'pricingTable',
node,
- props: nextProps,
+ props,
}),
);
- this.telemetry?.record(eventPrebuiltComponentMounted(component, nextProps));
+ this.telemetry?.record(eventPrebuiltComponentMounted(component, props));
};
public unmountPricingTable = (node: HTMLDivElement): void => {
diff --git a/packages/ui/src/components/PricingTable/__tests__/PricingTable.test.tsx b/packages/ui/src/components/PricingTable/__tests__/PricingTable.test.tsx
index cdc94b9ae3f..101fa8fbe03 100644
--- a/packages/ui/src/components/PricingTable/__tests__/PricingTable.test.tsx
+++ b/packages/ui/src/components/PricingTable/__tests__/PricingTable.test.tsx
@@ -513,61 +513,6 @@ describe('PricingTable - plans visibility', () => {
await findByRole('heading', { name: 'Test Plan' });
});
- it('fetches organization plans and renders when using legacy forOrganizations: true', async () => {
- const { wrapper, fixtures, props } = await createFixtures(f => {
- f.withBilling();
- f.withOrganizations();
- f.withUser({ email_addresses: ['test@clerk.com'], organization_memberships: ['Org1'] });
- });
-
- // Set legacy prop via context provider
- props.setProps({ forOrganizations: true } as any);
-
- fixtures.clerk.billing.getStatements.mockRejectedValue();
- fixtures.clerk.organization.getPaymentMethods.mockRejectedValue();
- fixtures.clerk.billing.getPlans.mockResolvedValue({ data: [testPlan as any], total_count: 1 });
- fixtures.clerk.billing.getSubscription.mockResolvedValue({
- id: 'sub_org_active',
- status: 'active',
- activeAt: new Date('2021-01-01'),
- createdAt: new Date('2021-01-01'),
- nextPayment: null,
- pastDueAt: null,
- updatedAt: null,
- subscriptionItems: [
- {
- id: 'si_active_org',
- plan: { ...testPlan, forPayerType: 'organization' },
- createdAt: new Date('2021-01-01'),
- paymentMethodId: 'src_1',
- pastDueAt: null,
- canceledAt: null,
- periodStart: new Date('2021-01-01'),
- periodEnd: new Date('2021-01-31'),
- planPeriod: 'month' as const,
- status: 'active' as const,
- isFreeTrial: false,
- cancel: vi.fn(),
- pathRoot: '',
- reload: vi.fn(),
- },
- ],
- pathRoot: '',
- reload: vi.fn(),
- });
-
- const { getByRole } = render(, { wrapper });
-
- await waitFor(() => {
- // Ensure plans rendered
- expect(getByRole('heading', { name: 'Test Plan' })).toBeVisible();
- // Ensure API args reflect org context
- expect(fixtures.clerk.billing.getPlans).toHaveBeenCalledWith(expect.objectContaining({ for: 'organization' }));
- // Ensure subscription called with active org
- expect(fixtures.clerk.billing.getSubscription).toHaveBeenCalledWith(expect.objectContaining({ orgId: 'Org1' }));
- });
- });
-
it('fetches organization plans and renders when using for: organization', async () => {
const { wrapper, fixtures, props } = await createFixtures(f => {
f.withBilling();
diff --git a/packages/ui/src/contexts/ClerkUIComponentsContext.tsx b/packages/ui/src/contexts/ClerkUIComponentsContext.tsx
index 271773756d3..e2670d3314d 100644
--- a/packages/ui/src/contexts/ClerkUIComponentsContext.tsx
+++ b/packages/ui/src/contexts/ClerkUIComponentsContext.tsx
@@ -95,12 +95,7 @@ export function ComponentContextProvider({
);
case 'PricingTable':
return (
-
+
{children}