onDiscountRuleUpdated( )


An event that is triggered when a discount rule is updated.

The onDiscountRuleUpdated() event handler runs when a discount rule is updated. The received DiscountRuleUpdated object contains information about the discount rule that was updated.

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

Method Declaration
Copy
function wixEcomDiscounts_onDiscountRuleUpdated(
  event: DiscountRuleUpdated,
): void;
Method Parameters
eventDiscountRuleUpdated

Information about the discount rule that was updated.

onDiscountRuleUpdated example
JavaScript
export function wixEcomDiscounts_onDiscountRuleUpdated(event) { const eventId = event.metadata.id; const entityId = event.entity._id; }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

onAbandonedCheckoutRecovered( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

An event that triggers when an abandoned checkout is recovered (the customer completes the checkout).

The onAbandonedCheckoutCreated() event handler runs when an abandoned checkout is recovered. The AbandonedCheckoutRecoveredEvent object contains information about the abandoned checkout that was recovered, and the event metadata.

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

Method Declaration
Copy
Method Parameters
eventAbandonedCheckoutRecoveredEvent

Information about the abandoned checkout that was recovered.

An event fired when an abandoned checkout is recovered
JavaScript
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

onBackInStockNotificationRequestCreated( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Triggered when a back in stock notification request is created.

The onBackInStockNotificationRequestCreated() event handler runs when a back in stock notification request is created. The received BackInStockNotificationRequestCreated object contains information about the back in stock notification request that was created and event metadata.

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

Method Declaration
Copy
Method Parameters
eventBackInStockNotificationRequestCreated

Information about the back in stock notification request that was created.

onBackInStockNotificationRequestCreated example
JavaScript
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

onBackInStockNotificationRequestDeleted( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Triggered when a back in stock notification request is deleted.

The onBackInStockNotificationRequestDeleted() event handler runs when a back in stock notification request is deleted. The received BackInStockNotificationRequestDeleted object contains event metadata.

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

Method Declaration
Copy
Method Parameters
eventBackInStockNotificationRequestDeleted

Information about the back in stock notification request that was deleted.

onBackInStockNotificationRequestDeleted example
JavaScript
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

onBackInStockNotificationRequestUpdated( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Triggered when a back in stock notification request is updated.

The onBackInStockNotificationRequestUpdated() event handler runs when a back in stock notification request is updated. The received BackInStockNotificationRequestUpdated object contains information about the back in stock notification request that was updated and event metadata.

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

Method Declaration
Copy
Method Parameters
eventBackInStockNotificationRequestUpdated

Information about the back in stock notification request that was updated.

onBackInStockNotificationRequestUpdated example
JavaScript
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

onCartCreated( )


An event that triggers when a new cart is created.

The onCartCreated() event handler runs when a new cart is created. The received CartCreated object contains information about the cart that was created and event metadata.

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

Method Declaration
Copy
Method Parameters
eventCartCreated

Information about the cart that was created and event metadata.

An event fired when a cart is created
JavaScript
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?