Skip to main content

benecaster_badge_definition_deleted

Action Premium

Fires after a badge definition is deleted, along with every assignment of that badge to a subscriber.

Read the badge details from $badge, which holds a full snapshot taken before the delete. Do not try to look the badge up — by the time this fires there is nothing left to find. Use for cleaning up anything you created elsewhere off the back of that badge: external entitlements, generated images, CRM fields.

Parameters

Name Type Default Description
$id int Badge definition ID
$tier_id int Membership tier the badge belonged to
$badge array The badge row as it stood immediately before deletion

Need this built rather than just documented? See our services →