fix: expose beforeRefreshingPaymentCollection hook (#12232)
Fixes: FRMW-2942 Fixes: #12228
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/core-flows": patch
|
||||
---
|
||||
|
||||
fix: expose beforeRefreshingPaymentCollection hook
|
||||
@@ -292,14 +292,17 @@ export const refreshCartItemsWorkflow = createWorkflow(
|
||||
},
|
||||
})
|
||||
|
||||
createHook("beforeRefreshingPaymentCollection", { input })
|
||||
const beforeRefreshingPaymentCollection = createHook(
|
||||
"beforeRefreshingPaymentCollection",
|
||||
{ input }
|
||||
)
|
||||
|
||||
refreshPaymentCollectionForCartWorkflow.runAsStep({
|
||||
input: { cart_id: input.cart_id },
|
||||
})
|
||||
|
||||
return new WorkflowResponse(refetchedCart, {
|
||||
hooks: [setPricingContext] as const,
|
||||
hooks: [setPricingContext, beforeRefreshingPaymentCollection] as const,
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user