Documentation > Developers > Filter Examples > Customize Reminder Email Text

Customize Reminder Email Text

/**
 * Customize the reminder email text
 */
function my_picu_reminder_email_content( $mail_parts, $mail_context, $collection_id ) {
    if ( $mail_context == 'client_reminder' && class_exists( 'Picu_Emails' ) ) {
	$picu_mail = new Picu_Emails( $collection_id );
        // Replace mail part:
        $mail_parts[0] = [
            'type' => 'text',
            'text' => $picu_mail->text_to_html( 'My custom text here' )
        ];
    }

    return $mail_parts;
}

add_filter( 'picu_mail_parts', 'my_picu_reminder_email_content', 10, 3 );Code language: PHP (php)

Need help?

If you couldn’t find what you were looking for and need more assistance, please get in touch with us directly and we’re happy to help.