onCategoryDeleted( )


A backend event that fires when a forum category is deleted.

The onCategoryDeleted() event handler runs when an existing forum category in your site is deleted. The received DeletedCategory object contains information about the category that was deleted.

Note: Backend events are not fired when previewing your site.

Method Declaration
Copy
function onCategoryDeleted(event: DeletedCategory): void;
Method Parameters
eventDeletedCategoryRequired

Information about the forum category that was deleted.

A backend event that occurs when a forum category is deleted
JavaScript
// Place this code in a file named events.js // in the Backend section of your code files. export function wixForum_onCategoryDeleted(event) { const deletedCategoryId = event.categoryId; console.log("Category deleted"); }
Errors

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

Did this help?