chore(core-flows): use cart id when force_refresh is true (#11625)

This commit is contained in:
Carlos R. L. Rodrigues
2025-02-26 11:01:05 -03:00
committed by GitHub
parent 93cbc6b669
commit 65eb3aa6c8

View File

@@ -148,12 +148,22 @@ export const refreshCartItemsWorkflow = createWorkflow(
list: false,
}).config({ name: "refetchcart" })
const refreshCartInput = transform(
{ refetchedCart, input },
({ refetchedCart, input }) => {
return {
cart: !input.force_refresh ? refetchedCart : undefined,
cart_id: !!input.force_refresh ? input.cart_id : undefined,
}
}
)
refreshCartShippingMethodsWorkflow.runAsStep({
input: { cart: refetchedCart },
input: refreshCartInput,
})
updateTaxLinesWorkflow.runAsStep({
input: { cart: refetchedCart },
input: refreshCartInput,
})
const cartPromoCodes = transform(