benecaster_price_change_subscriber_applied
Fires once per subscriber whose Stripe item is moved to the new Price. Covers both tier and buy-up price changes.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$user_id |
int |
— | The subscriber moved. |
$show_id |
int |
— | The show the change belongs to. |
$change |
array |
— | The change row, including `item_name`, `old_amount_cents`, `new_amount_cents` and `currency`. |
Examples
Sync a price change to an external CRM
add_action( 'benecaster_price_change_subscriber_applied', function ( int $user_id, int $show_id, array $change ): void {
my_crm_log_price_change( $user_id, $change['item_name'], $change['old_amount_cents'], $change['new_amount_cents'], $change['currency'] );
}, 10, 3 );
Notes
Amounts are minor units (old_amount_cents, new_amount_cents), in $change['currency'] — whole units for zero-decimal currencies such as JPY. That differs from benecaster_buyups.price, which is dollars. Moved ≠ charged — this fires when the Stripe item is switched, just before the renewal the notice named; the first charge at the new price comes with that renewal's invoice. Recipe: See price-change-cohort.
Need this built rather than just documented? See our services →