From 7b3b4ff68a8825c1519a9d39e67bff2ac93f9fc8 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Fri, 23 May 2025 18:48:46 +0300 Subject: [PATCH] chore(core-flows): ignore hooks in complete cart workflow (#12600) --- .../core/core-flows/src/cart/workflows/complete-cart.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/core/core-flows/src/cart/workflows/complete-cart.ts b/packages/core/core-flows/src/cart/workflows/complete-cart.ts index 454ce71886..064ad730bd 100644 --- a/packages/core/core-flows/src/cart/workflows/complete-cart.ts +++ b/packages/core/core-flows/src/cart/workflows/complete-cart.ts @@ -84,8 +84,6 @@ export const completeCartWorkflowId = "complete-cart" * Complete a cart and place an order. * * @property hooks.validate - This hook is executed before all operations. You can consume this hook to perform any custom validation. If validation fails, you can throw an error to stop the workflow execution. - * @property hooks.beforePaymentAuthorization - This hook is executed before the payment authorization. You can consume this hook to perform any custom logic before the payment is authorized, such as validation with custom payment providers. - * @property hooks.orderCreated - This hook is executed after the order is created. You can consume this hook to perform any custom logic after the order is created, such as creating custom models linked to the order. */ export const completeCartWorkflow = createWorkflow( { @@ -334,6 +332,9 @@ export const completeCartWorkflow = createWorkflow( }) ) + /** + * @ignore + */ createHook("beforePaymentAuthorization", { input, }) @@ -369,6 +370,9 @@ export const completeCartWorkflow = createWorkflow( addOrderTransactionStep(orderTransactions) + /** + * @ignore + */ createHook("orderCreated", { order_id: createdOrder.id, cart_id: cart.id,