Skip to main content

benecaster_donor_enrollment_label

Filter Free Since v1.0.0

Filters the mailing-list opt-in checkbox label shown on the donation form when a show has the Donor mailing-list opt-in toggle enabled. Fired in two places (documented once here): StripeRenderer::donor_enrollment_label() for form-mode donations, and ListenerSupportIntentController::get_config() for the runtime config JSON consumed by JS-built modal variants (button/icon styles).

Default label: ‘Add me to {show_title}‘s mailing list’. Falls back to ‘Add me to this show’s mailing list’ when the show title is empty.

Parameters

Name Type Default Description
$label string The default checkbox label string
$show_id int ID of the show whose donation form is rendering
$show_title string Title of the show; empty string when the show has no title

Returns: string

Examples

Override the opt-in label with a translatable string

add_filter( 'benecaster_donor_enrollment_label', function( string $label, int $show_id, string $show_title ): string {
    return sprintf(
        /* translators: %s: show title */
        __( 'Join the %s newsletter', 'my-plugin' ),
        $show_title ?: __( 'show', 'my-plugin' )
    );
}, 10, 3 );

Notes

The filter fires regardless of whether the donor has checked the box. It controls the label text only — it does not gate whether the checkbox appears. To hide the checkbox entirely, disable the per-show toggle in Shows -> [show] -> Listener Support.

Affects

  • Listener Support Donation Form