Documentation » Filter Hooks

groundhogg/email_template/unsubscribe_text

Published · Last updated

Filters the anchor text of the unsubscribe link in the email footer.

apply_filters( 'groundhogg/email_template/unsubscribe_text', $text );

You will receive the current unsubscribe link text string.

Example

add_filter( 'groundhogg/email_template/unsubscribe_text', 'my_extension_custom_unsub_text' );

/**
 * Replace the default unsubscribe link text.
 *
 * @param string $text
 *
 * @return string
 */
function my_extension_custom_unsub_text( $text ) {
    return __( 'Manage your email preferences', 'my-extension' );
}