Skip to main content

Mirror Supporter Wall opt-in changes to an external CRM or audit log

Free Beginner Since v1.0.0

SupporterWallManager::set_subscriber_visible() fires benecaster_subscriber_wall_visible( int $user_id, bool $visible ) after every write — including same-value writes (the action fires on every save so add-ons can observe explicit re-confirmation events, not just transitions). Use to push the subscriber’s consent state to a CRM, write to a compliance audit log, or trigger a Slack notification when a high-tier subscriber opts in.

Code

<?php
add_action( 'benecaster_subscriber_wall_visible', function ( int $user_id, bool $visible ): void {
    my_crm_set_field( $user_id, 'show_on_supporter_wall', $visible );
    my_audit_log( sprintf(
        'user=%d set supporter_wall_visible=%s',
        $user_id,
        $visible ? 'true' : 'false'
    ) );
}, 10, 2 );

View on GitHub →

Hooks Used