onDiscountRuleUpdated( )


An event that is triggered when a discount rule is updated.

The onDiscountRuleUpdated() event handler runs when a discount rule is updated. The received DiscountRuleUpdated object contains information about the discount rule that was updated.

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

Method Declaration
Copy
function wixEcomDiscounts_onDiscountRuleUpdated(
  event: DiscountRuleUpdated,
): void;
Method Parameters
eventDiscountRuleUpdated

Information about the discount rule that was updated.

onDiscountRuleUpdated example
JavaScript
export function wixEcomDiscounts_onDiscountRuleUpdated(event) { const eventId = event.metadata.id; const entityId = event.entity._id; }
Errors

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

Did this help?