Action and Filter Hooks

CycleSave fires WordPress action and filter hooks at key points so developers can extend or integrate with the plugin. Useful for custom notifications (Slack, SMS), syncing data with external systems, or modifying behaviour.

Action Hooks

Hook Parameters When it fires
cyclesave_member_joined $member_id, $group_id, $user_id A user is added to a group
cyclesave_group_full $group_id Group reaches max members
cyclesave_group_activated $group_id Admin activates a group
cyclesave_payout_order_changed $group_id, $new_order, $change_reason Payout order is updated
cyclesave_round_created $round_id, $group_id, $round_number A new round opens
cyclesave_round_closed $round_id, $group_id, $payout_amount A round closes
cyclesave_contribution_success $contribution_id, $round_id Contribution payment confirmed
cyclesave_missed_payment $member_id, $round_id Contribution marked as missed
cyclesave_upcoming_payout $member_id, $round_id Member is next for payout
cyclesave_payout_completed $payout_id, $group_id Payout is disbursed
cyclesave_cycle_completed $group_id All rounds finished
cyclesave_unknown_webhook_event $event Unrecognised webhook event received
cyclesave_send_contribution_reminder $member, $round, $is_urgent Reminder fired for unpaid member

Filter Hooks

Filter Parameters What you can do
cyclesave_gateway_label $label, $gateway_slug Change the display name of a payment gateway
cyclesave_gateway_for_group $gateway_slug, $group_id Override which gateway is used for a specific group
cyclesave_admin_addons $addons Add or remove entries on the Integrations tab

Example: Change the Stripe Label

add_filter( 'cyclesave_gateway_label', function( $label, $slug ) {
    if ( $slug === 'stripe' ) {
        return 'Card Payment';
    }
    return $label;
}, 10, 2 );

Example: Run Custom Logic After a Contribution

add_action( 'cyclesave_contribution_success', function( $contribution_id, $round_id ) {
    // Your custom logic here
}, 10, 2 );

Example: Log Missed Payments Externally

add_action( 'cyclesave_missed_payment', function( $member_id, $round_id ) {
    // Look up member details and send to your monitoring service
}, 10, 2 );