chore(core-flows): use cart id when force_refresh is true (#11625)
This commit is contained in:
@@ -148,12 +148,22 @@ export const refreshCartItemsWorkflow = createWorkflow(
|
|||||||
list: false,
|
list: false,
|
||||||
}).config({ name: "refetch–cart" })
|
}).config({ name: "refetch–cart" })
|
||||||
|
|
||||||
|
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({
|
refreshCartShippingMethodsWorkflow.runAsStep({
|
||||||
input: { cart: refetchedCart },
|
input: refreshCartInput,
|
||||||
})
|
})
|
||||||
|
|
||||||
updateTaxLinesWorkflow.runAsStep({
|
updateTaxLinesWorkflow.runAsStep({
|
||||||
input: { cart: refetchedCart },
|
input: refreshCartInput,
|
||||||
})
|
})
|
||||||
|
|
||||||
const cartPromoCodes = transform(
|
const cartPromoCodes = transform(
|
||||||
|
|||||||
Reference in New Issue
Block a user