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:
co-authored by
Adrien de Peretti
Oli Juhl
parent
a78f68fa46
commit
d565a92f63
@@ -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