Add hidden product option to billing components (#136)

- Introduced `hidden` field in product schema to control product visibility
- Updated PlanPicker and PricingTable to filter out hidden products
- Ensures hidden products are not displayed to users
This commit is contained in:
Giancarlo Buomprisco
2025-02-04 06:27:43 +07:00
committed by GitHub
parent 3553422e42
commit b319ceb5bb
3 changed files with 15 additions and 2 deletions

View File

@@ -252,6 +252,11 @@ const ProductSchema = z
description: 'Highlight this product. Displayed to the user.',
})
.optional(),
hidden: z
.boolean({
description: 'Hide this product from being displayed to users.',
})
.optional(),
plans: z.array(PlanSchema),
})
.refine((data) => data.plans.length > 0, {