refactor: Remove unused createCustomersCollection export and related usage

- Eliminate `createCustomersCollection` from collections and main index files
- Update `config.collections` logic to remove customer collection dependency
This commit is contained in:
2025-09-15 21:15:18 +02:00
parent a340e5d9e7
commit 5f8fee33bb
2 changed files with 1 additions and 4 deletions

View File

@@ -1,4 +1,3 @@
export { createCustomersCollection } from './customers'
export { createInvoicesCollection } from './invoices'
export { createPaymentsCollection } from './payments'
export { createRefundsCollection } from './refunds'

View File

@@ -2,7 +2,6 @@ import type { Config } from 'payload'
import type { BillingPluginConfig, CustomerInfoExtractor } from './types'
import { createCustomersCollection } from './collections/customers'
import { createInvoicesCollection } from './collections/invoices'
import { createPaymentsCollection } from './collections/payments'
import { createRefundsCollection } from './collections/refunds'
@@ -42,7 +41,6 @@ export const billingPlugin = (pluginConfig: BillingPluginConfig = {}) => (config
config.collections.push(
createPaymentsCollection(pluginConfig.collections?.payments || 'payments'),
createCustomersCollection(customerSlug),
createInvoicesCollection(
pluginConfig.collections?.invoices || 'invoices',
pluginConfig.collections?.customerRelation !== false ? customerSlug : undefined,