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.
function onCollectionDeleted(event: CollectionDeletedEvent): void;
Information about the product collection that was deleted.
// 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"
* }
*
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.