An event that is triggered when a discount rule is deleted.
The onDiscountRuleDeleted()
event handler runs when a discount rule is deleted. The received DiscountRuleDeleted
object contains event metadata.
Note: Backend events don't work when previewing your site.
function wixEcomDiscounts_onDiscountRuleDeleted(
event: DiscountRuleDeleted,
): void;
Information about the discount rule that was deleted.
export function wixEcomDiscounts_onDiscountRuleDeleted(event) {
const eventId = event.metadata.id;
const entityId = event.entity._id;
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.