Skip to content
Docs
Get RestroPress

Filter

rpress_email_template_tags

Updated
On this page

Filters email content after template tags have been replaced.

Applied in rpress_do_email_tags() after the registered tags have been replaced for the payment. It exists for backwards compatibility with older code that parsed its own tags in a filter. New tags should be registered with rpress_add_email_tag() on rpress_add_email_tags instead.

Parameters#

ParameterTypeDescription
$contentstringEmail content with registered tags already replaced.
$arg2arrayThe payment meta array for the order.
$payment_idintThe order ID.

Return value#

string. The content with any further replacements applied.

Example#

function my_email_template_tags( $content, $payment_meta, $payment_id ) {
	return str_replace( '{my_order_ref}', 'REF-' . $payment_id, $content );
}
add_filter( 'rpress_email_template_tags', 'my_email_template_tags', 10, 3 );

Source#

Applied in:

  • includes/emails/email-tags.php (line 96), in rpress_do_email_tags()

See also#

Was this page helpful?