benecaster_membership_tiers_reordered
Fires after the Memberships → Tiers list saves a new tier order — every drag or keyboard reorder auto-saves through this.
Fires once per reorder, never per tier, and not at all when the submitted order matches the stored one or the tiers submitted don’t exactly match the show’s tiers. benecaster_membership_tier_updated does not fire for a reorder.
By the time this fires, the new order is saved in $tier_ids order and the show’s feed cache has already been cleared. Rank is a tier’s position in $tier_ids, which is also what [benecaster_tier_gate] compares — use the index, never a raw tier_order value.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$show_id |
int |
— | ID of the show whose tiers were reordered. |
$tier_ids |
int[] |
— | The new order, lowest rank first. |
$previous_ids |
int[] |
— | The order immediately before this reorder. |
Examples
Sync tier rank to an external CRM after a reorder
// A reorder on Memberships → Tiers fires this once for the show, NOT
// benecaster_membership_tier_updated per tier. Rank = position (0 = lowest).
add_action( 'benecaster_membership_tiers_reordered', function ( int $show_id, array $tier_ids ): void {
foreach ( $tier_ids as $rank => $tier_id ) {
my_crm_set_plan_rank( $show_id, $tier_id, $rank );
}
}, 10, 2 );
Need this built rather than just documented? See our services →