af/form/email/subject

Filter the subect line of a form email before sending.

<?php

function filter_email_subject( $subject, $email, $form, $fields ) {
	// Alter the subject line
	$subject = 'New subject';
    
    return $subject;
}
add_filter( 'af/form/email/subject', 'filter_email_subject', 10, 4 );
add_filter( 'af/form/email/subject/id=FORM_ID', 'filter_email_subject', 10, 4 );
add_filter( 'af/form/email/subject/key=FORM_KEY', 'filter_email_subject', 10, 4 );