Skip to main content

benecaster_subscribe_send_password_email

Filter Free

Controls whether Benecaster sends the guest_password_set email to someone whose WordPress account was created for them — admin bulk enrollment, a subscriber added by hand, the donation-completion webhook, or a Migration Wizard import. Default: true.

The Migration Wizard returns false for the accounts it creates, but only when the migration email sequence is switched on — it sends its own way in instead. It does so at priority 99, around the import only, so with the sequence off nothing is suppressed, and a callback at a later priority can still turn the email back on.

Return false to suppress it — the case this exists for is a site whose own onboarding flow already sends a welcome-and-set-password message, where Benecaster’s email would be a duplicate. It is also the switch for volume: a 400-address bulk import sends 400 reset emails on top of 400 welcome emails.

This gates the email only. benecaster_subscriber_account_provisioned still fires either way, so listeners doing non-email work — CRM enrollment, tagging, analytics — are unaffected.

Parameters

Name Type Default Description
$should_send bool — Whether to send. `true` unless already filtered.
$user_id int — WordPress user ID of the newly created account.
$show_id int — ID of the show the account was provisioned against, so the decision can vary per show.
$source string — Which flow created the account — `bulk_enroll`, `manual_add`, `donation_signup` or `migration` (a Migration Wizard import) — so a site can suppress one and leave the others alone. Callbacks registered with `3` accepted args are unaffected.

Returns: bool

Examples

Suppress Benecaster's email because our own onboarding covers it

add_filter( 'benecaster_subscribe_send_password_email', function ( bool $should_send, int $user_id, int $show_id ): bool {
    // Our welcome sequence already includes a set-password link.
    return false;
}, 10, 3 );

Suppress for bulk imports only

add_filter( 'benecaster_subscribe_send_password_email', function ( bool $should_send, int $user_id, int $show_id, string $source ): bool {
    // We onboard imported lists by hand; the hand-added and donation
    // flows still get the link.
    return 'bulk_enroll' === $source ? false : $should_send;
}, 10, 4 );

Notes

If you suppress this, you must provide a password path yourself. These accounts are created with a generated password nobody has seen, so a subscriber with no reset link cannot log in at all — they can still receive their feed, but they cannot reach the account page to get it, reset a token, or manage anything. Suppressing without a replacement strands the subscriber, and the symptom arrives later as a support request that looks unrelated.

Do not suppress in order to send your own alongside Benecaster's. Two set-password emails means two single-use reset links, and the later one invalidates the earlier — a subscriber who opens the first email gets an expired-link error. Suppress Benecaster's, then send yours.

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