onOrderCreated( )


An event that triggers when an order is created.

The onOrderCreated() event handler runs when an order is created. The received OrderCreatedEvent object contains information about the created order.

This event handler runs for both online orders and offline orders.

Note: Backend events don't work when previewing your site.

Method Declaration
Copy
Method Parameters
eventOrderCreatedEventRequired

Information about the created order and metadata for the event.

Was this helpful?
Yes
No