benecaster_email_resent
Fires after benecaster_resend_email() has queued a logged email again from the copy the queue kept.
benecaster_after_email_send does not fire for a resend, so a listener there that counts or tags “welcome sent” never counts the same email twice. Record a resend here instead.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$user_id |
int|null |
— | The WordPress user the email was for, or null when the logged send named none |
$show_id |
int|null |
— | The show the email was sent for, or null when the logged send named none |
$email_type |
string |
— | Email type string of the resent email |
$log_id |
int |
— | The email log row that was resent |
$new_log_id |
int |
— | The *queued* log row the resend wrote; 0 if that write failed. Register with 6 accepted args to receive it |
$new_queue_id |
int |
— | The email queue row the resend wrote |
Examples
Note each resend
add_action( 'benecaster_email_resent', function ( ?int $user_id, ?int $show_id, string $type, int $log_id ): void {
my_addon_note( "Resent {$type} (log {$log_id})" );
}, 10, 4 );
Notes
As with every send, queued is not delivered: the new queue row is where to see whether it went out. See Resend an email from the log.
Need this built rather than just documented? See our services →