mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-10 10:53:23 +00:00
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:
@@ -1,4 +1,3 @@
|
||||
export { createCustomersCollection } from './customers'
|
||||
export { createInvoicesCollection } from './invoices'
|
||||
export { createPaymentsCollection } from './payments'
|
||||
export { createRefundsCollection } from './refunds'
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user