The following snippet will add a Reply-To header to the client, who has just approved their selection.
function my_picu_email_headers( $headers, $mail_context, $collection_id, $ident ) {
if ( $mail_context == 'photographer_collection_approved' && function_exists( 'picu_get_email_from_ident' ) ) {
// Get the client email address
$email = picu_get_email_from_ident( $collection_id, $ident );
if ( is_email( $email ) ) {
$headers .= "Reply-To: " . $email . "\r\n";
}
}
return $headers;
}
add_filter( 'picu_email_headers', 'my_picu_email_headers', 10, 4 );
Code language: PHP (php)