Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This hook is used to stop an email from sending based on the content on the email.
Usage
add_filter('frm_send_email', 'frm_stop_email_with_no_entries', 10, 2);
Parameters
- $send (boolean)
- $email (array)
Examples
Basic Example
This will prevent an email from sending if the content of the email is 'No Entries Found'.
add_filter('frm_send_email', 'frm_stop_email_with_no_entries', 10, 2);
function frm_stop_email_with_no_entries( $send, $email){
if ($email['message'] == 'No Entries Found') {
$send = false;
}
return $send;
}