onCollectionUpdated( )


An event that fires when a product collection is updated.

The onCollectionUpdated() event handler runs when a product collection is updated in a store.

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

Method Declaration
Copy
Method Parameters
eventCollectionUpdatedEventRequired

Information about the product collection that was updated.

An event when a product collection is updated
JavaScript
Did this help?

onFulfillmentCreated( )


Deprecated. This event will continue to work until September 4, 2024, but a newer version is available at wix-ecom-backend.Events.onFulfillmentsUpdated().

We recommend you migrate to the new Wix eCommerce APIs as soon as possible.

An event that fires when an order fulfillment is created.

The onFulfillmentCreated() event handler runs when one of the following occurs:

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

Method Declaration
Copy
Method Parameters
eventFulfillmentCreatedEventRequired

Information about a fulfillment that was created.

An event when a fulfillment is created
JavaScript
Did this help?

onFulfillmentDeleted( )


Deprecated. This event will continue to work until September 4, 2024, but a newer version is available at wix-ecom-backend.Events.onFulfillmentsUpdated().

We recommend you migrate to the new Wix eCommerce APIs as soon as possible.

An event that fires when an order fulfillment is deleted.

The onFulfillmentDeleted() event handler runs when the deleteFulfillment() function is called.

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

Method Declaration
Copy
Method Parameters
eventFulfillmentDeletedEventRequired

Information about a fulfillment that was deleted.

An event when a fulfillment is deleted
JavaScript
Did this help?

onFulfillmentUpdated( )


Deprecated. This event will continue to work until September 4, 2024, but a newer version is available at wix-ecom-backend.Events.onFulfillmentsUpdated().

We recommend you migrate to the new Wix eCommerce APIs as soon as possible.

An event that fires when an order fulfillment is updated.

The onFulfillmentUpdated() event handler runs when one of the following occurs:

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

Method Declaration
Copy
Method Parameters
eventFulfillmentUpdatedEventRequired

Information about a fulfillment that was updated.

An event when a fulfillment is updated
JavaScript
Did this help?

onInventoryItemUpdated( )


An event that fires when an inventory item's information is updated.

The onInventoryItemUpdated() event handler runs when information for an inventory item is updated in a store.

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

Method Declaration
Copy
Method Parameters
eventInventoryItemUpdatedEventRequired

Information about the updated inventory item.

An event when an inventory item's information is updated
JavaScript
Did this help?

onInventoryVariantUpdated( )


An event that fires when the inventory information of a product variant is updated.

The onInventoryVariantUpdated() event handler runs when inventory information for a product variant is updated in a store.

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

Method Declaration
Copy
Method Parameters
eventInventoryVariantUpdatedEventRequired

Information about the updated variant.

An event when product variant inventory information is updated
JavaScript
Did this help?

onNewOrder( )


Deprecated. This event will continue to work until September 4, 2024, but a newer version is available at wix-ecom-backend.Events.onOrderApproved().

We recommend you migrate to the new Wix eCommerce APIs as soon as possible.

An event that fires when a new order is placed.

The onNewOrder() event handler runs when a new order is placed in your site's store. The received NewOrderEvent object contains information about the new order that was placed.

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

Method Declaration
Copy
Method Parameters
eventNewOrderEventRequired

The order data.

An event when a new order is placed
JavaScript
Did this help?

onOrderCanceled( )


Deprecated. This event will continue to work until September 4, 2024, but a newer version is available at wix-ecom-backend.Events.onOrderCanceled().

We recommend you migrate to the new Wix eCommerce APIs as soon as possible.

An event that fires when an order is canceled.

The onOrderCanceled() event handler runs when an order is canceled. For example, when an order is canceled in the site's Dashboard.

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

Method Declaration
Copy
Method Parameters
eventOrderCanceledEventRequired

Order canceled event.

An event when an order is canceled
JavaScript
Did this help?

onOrderPaid( )


Deprecated. This event will continue to work until September 4, 2024, but a newer version is available at wix-ecom-backend.Events.onOrderPaymentStatusUpdated().

We recommend you migrate to the new Wix eCommerce APIs as soon as possible.

An event that fires when an order is marked as paid.

The onOrderPaid() event handler runs when an order is paid either via customer checkout, or when marked as paid on your site's Dashboard.

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

Method Declaration
Copy
Method Parameters
eventOrderRequired

Paid order data.

An event when an order is paid
JavaScript
Did this help?

onOrderRefunded( )


Deprecated. This event will continue to work until September 4, 2024, but a newer version is available at wix-ecom-backend.Events.onOrderTransactionsUpdated().

We recommend you migrate to the new Wix eCommerce APIs as soon as possible.

An event that fires when an order is refunded.

The onOrderRefunded() event handler runs when an order is refunded. For example, when an order is refunded in your site's Dashboard.

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

Method Declaration
Copy
Method Parameters
eventOrderRefundedEventRequired

Order refunded event.

An event when an order is refunded
JavaScript
Did this help?

onProductCreated( )


An event that fires when a product is created.

The onProductCreated() event handler runs when a new product is added to a store.

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

Method Declaration
Copy
function onProductCreated(event: ProductCreatedEvent): void;
Method Parameters
eventProductCreatedEventRequired

Information about the product that was created.

An event when a product is created
JavaScript
// Place this code in the events.js file // of your site's Backend section. export function wixStores_onProductCreated(event) { let productId = event._id; } /* Full event object: * * { * "_id": "5096485f-0239-3881-3f6a-63955708a4ec", * "name": "New Product", * "sku": "abc123", * "formattedDiscountedPrice": "$100.00", * "visible": true, * "mainMedia": "wix:image://v1/6...6.jpg/file.jpg#originWidth=2700&originHeight=2186", * "price": 100, * "formattedPrice": "$100.00", * "discountedPrice": 100, * "pricePerUnit": 0.1, * "formattedPricePerUnit": "$0.10", * "mediaItems": [ * { * "title": "Main Image", * "description": "Main Image", * "type": "IMAGE", * "src": "wix:image://v1/6...6.jpg/file.jpg#originWidth=2700&originHeight=2186" * } * ], * "currency": "USD", * "productPageUrl": "/product-page/new-product", * "ribbon": "New Arrival" * } * */
Did this help?