OrderDiscountsReversed
The event an integration fires when an order that used discounts is refunded or cancelled, so Siren can give back any store credit it spent.
Requires Siren Essentials
WordPress plugin
Last updated: October 26, 2026
OrderDiscountsReversed is the refund side of OrderDiscountsDetected. An integration fires it when an order with discounts is refunded or cancelled. Siren finds the store credit it took for that order and gives it back to the collaborator, which fires CreditIssued.
The event ID is order_discounts_reversed, and its fully qualified class is Siren\Commerce\Events\OrderDiscountsReversed.
What does this event carry?
It carries what OrderDiscountsDetected carries, except the hold token.
getUserId()is the shopper’s user ID on the platform.getUserType()is the mapping type the user ID is linked under. It defaults touser.getPlatformReference()names the order. It must match the referenceOrderDiscountsDetectedcarried, because Siren finds the debit to give back by it.getDiscounts()lists the order’s discounts, each an array with acurrencyand adollarAmount, as onOrderDiscountsDetected.
use Siren\Commerce\Events\OrderDiscountsReversed;
$event = new OrderDiscountsReversed(
$customerId, // int: the shopper's user ID
'WooCommerce order #' . $orderId, // string: the same reference the detected event used
[
['currency' => 'STORE_CREDIT', 'dollarAmount' => 12.50],
] // array: one entry per discount on the order
);
How does the pipeline react?
ProcessOrderDiscountReversals in the credits domain picks it up. For each store credit currency in the discounts, it finds the order’s redemption entry and credits its amount back with a refund entry. The refund is keyed on the order too, so the same refund never gives credit back twice. Siren gives back only what it took, so when settlement took less than a discount because the balance was short, only that smaller amount comes back.
Settlement runs as a job, so the reversal can arrive before the debit. When no debit exists yet, Siren records the reversal. Settlement then takes nothing for an order that spent the credit before it was reversed. It still takes the credit for an order that spent it after, such as an unpaid order that was cancelled and then completed by a late payment.
Which integrations fire it?
The WooCommerce, Easy Digital Downloads, and LifterLMS store credit add-ons fire it. WooCommerce binds it to refunded and cancelled orders:
OrderDiscountsReversed::class => [
['action' => 'woocommerce_order_status_refunded', 'transformer' => $discountReversalCallback],
['action' => 'woocommerce_order_status_cancelled', 'transformer' => $discountReversalCallback],
],
LifterLMS fires it on lifterlms_order_status_refunded and lifterlms_order_status_cancelled, and Easy Digital Downloads on edd_post_refund_payment.
For the full lifecycle of commerce events, see the Commerce Events overview.