An event that triggers when an order is purchased.
The onOrderPurchased()
event handler runs when an order is purchased.
The received OrderPurchasedEvent
object contains information about the order that was purchased.
An order is considered purchased if:
Note: Backend events don't work when previewing your site.
Information about the order that was purchased and metadata for the event.