From 5f8fee33bbe9467656a7123c050394557d08db6d Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Mon, 15 Sep 2025 21:15:18 +0200 Subject: [PATCH] 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 --- src/collections/index.ts | 3 +-- src/index.ts | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/collections/index.ts b/src/collections/index.ts index e47e3f3..c0f2f5a 100644 --- a/src/collections/index.ts +++ b/src/collections/index.ts @@ -1,4 +1,3 @@ -export { createCustomersCollection } from './customers' export { createInvoicesCollection } from './invoices' export { createPaymentsCollection } from './payments' -export { createRefundsCollection } from './refunds' \ No newline at end of file +export { createRefundsCollection } from './refunds' diff --git a/src/index.ts b/src/index.ts index 949a0e2..372b61e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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,