fix(core-flows): refresh payment collection inside updateCartPromotionsWorkflow (patch) (#14274)
* Refresh payment collection after cart promotion update * Add missing test * Add changeset * Update changeset * Add force_refresh_payment_collection to updateCartPromotionsWorkflow to conditionally refresh payment collection * Prevent refreshing payment collection multiple times * Fix test * Formatting and unused vars * Force refresh payment collection on dedicated store cart promotion endpoints --------- Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com> Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
2 files changed
+89
-5
No files matched your search
@@ -19,6 +19,7 @@ export const POST = async (
|
||||
payload.promo_codes.length > 0
|
||||
? PromotionActions.ADD
|
||||
: PromotionActions.REPLACE,
|
||||
force_refresh_payment_collection: true,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -48,6 +49,7 @@ export const DELETE = async (
|
||||
promo_codes: payload.promo_codes,
|
||||
cart_id: req.params.id,
|
||||
action: PromotionActions.REMOVE,
|
||||
force_refresh_payment_collection: true,
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user