groundhogg/email/the_content

πŸ“… Published on

πŸ“ Last updated

Documentation

Β»

Filter Hooks

Β»

groundhogg/email/the_content

Filters the fully processed HTML content of an email after all blocks have been rendered and merge tags replaced. Use this to inject or modify content in the final email body.

apply_filters( 'groundhogg/email/the_content', $content );

You will receive the complete rendered HTML content string.

Example

add_filter( 'groundhogg/email/the_content', 'my_extension_append_tracking_block' );

/**
 * Append a custom tracking element to every outgoing email.
 *
 * @param string $content
 *
 * @return string
 */
function my_extension_append_tracking_block( $content ) {
    $pixel = '';

    return $content . $pixel;
}

Was this helpful?

Let us know if this document answered your question. That’s the only way we can improve.