onCollectionDeleted( )


An event that fires when a product collection is deleted.

The onCollectionDeleted() event handler runs when a product collection is deleted from a store.

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

Method Declaration
Copy
function onCollectionDeleted(event: CollectionDeletedEvent): void;
Method Parameters
eventCollectionDeletedEventRequired

Information about the product collection that was deleted.

An event when a product collection is deleted
JavaScript
// Place this code in the events.js file // of your site's Backend section. export function wixStores_onCollectionDeleted(event) { let collectionId = event.collectionId; } /* Full event object: * * { * "collectionId": "a7698dfb-12e8-1bd6-cdc1-0116554f18d1" * } * */
Errors

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

Did this help?