Search...
onCheckoutTemplateUsed( )
Developer Preview
Triggered when a checkout template is used to create a checkout.
Description
The onCheckoutTemplateUsed()
event handler runs when a checkout template is created. The received CheckoutTemplateUsedEvent
object contains information about the checkout template that was used, the checkout that was created, and event metadata.
Note: Backend events don't work when previewing your site.
Syntax
function wixEcom_onCheckoutTemplateUsed(event: CheckoutTemplateUsedEvent): void
onCheckoutTemplateUsed Parameters
NAME
TYPE
DESCRIPTION
event
Optional
CheckoutTemplateUsedEvent
Information about the checkout template that was used to create a checkout and event metadata.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
onCheckoutTemplateUsed example
Copy Code
12 export function wixEcom_onCheckoutTemplateUsed(event) {3 const eventId = event.metadata.id4 const entityId = event.data.checkoutTemplate._id;5 }67