-
Notifications
You must be signed in to change notification settings - Fork 174
Open
Description
What happened?
Description
I am not sure if it's a bug but I thought I would report it just in case.
If I partially refund an order and then adjust the order amount by for example adding a discount adjuster to match the refunded the amount so the order goes into paid status again then this event EVENT_AFTER_ORDER_PAID is triggered again. Is that on purpose? I believe it only happens due to Stripe webhooks as I cannot reproduce locally nor on staging where neither has Stripe webhooks running.
Steps to reproduce
- Partial refund a paid order
- Add a discount adjuster for the refunded amount so paid status is now "paid" again instead of partial paid.
- See that the event EVENT_AFTER_ORDER_PAID is triggered again after the Stripe webhook has been received
Expected behavior
That EVENT_AFTER_ORDER_PAID is only run once as the order was only paid once.
Actual behavior
EVENT_AFTER_ORDER_PAID is triggered again
Craft CMS version
5.8.17
Craft Commerce version
5.4.6
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response