Skip to main content

benecaster_price_change_apply_started

Action Premium

Fires on each apply pass over a due price change, before its pending subscribers are processed.

Parameters

Name Type Default Description
$change_id int — The change being applied.
$change array — The change row.
$pending_count int — Subscribers still pending on this pass.

Examples

Log the start of an apply pass

add_action( 'benecaster_price_change_apply_started', function ( int $change_id, array $change, int $pending_count ): void {
    my_ops_log( sprintf( 'Price change #%d applying to %d pending subscribers', $change_id, $pending_count ) );
}, 10, 3 );

Notes

A change can take several passes. A subscriber is moved only once Stripe's current_period_end has reached the renewal the notice email named. Any renewal inside the notice window bills at the old price, so a change stays pending until each of those has happened. Fired by Membership\PriceChange\PriceChangeApplier, run on the hourly benecaster_price_change_cron.

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