Description

Filter whether or not to send emails set by the Email Rules.


Passing a falsey value to the filter will effectively short-circut sending any emails set by the Email Rules.


Parameters

$setting

(bool) (required) The setting to return

Default: false


$form_id

(int) (optional) The form ID

Default: the form ID


$entry_id

(int) (optional) The entry ID

Default: the entry ID


Examples

Skip Email Rules emails for form ID 114:

 

add_filter( 'vfbp_skip_conditional_email', 'filter_vfbp_skip_conditional_email', 10, 3 );
 
function filter_vfbp_skip_conditional_email( $setting, $form_id, $entry_id ){    
	if ( 114 == $form_id )    
		return true;
}