wpcf7_mail_tag_replaced_{$type}

The contact-form-7 wpcf7 mail tag replaced {$type} hook.

Published Date - July 22, 2023

Description

$replaced = apply_filters(
				"wpcf7_mail_tag_replaced_{$type}", $replaced,
				$submitted, $html, $mail_tag
			);

Parameters

  1. $replaced

  2. $submitted

  3. $html

  4. $mail_tag


Usage

The following example is for adding a hook callback.

// define the wpcf7_mail_tag_replaced_{$type} callback 
function custom_wpcf7_mail_tag_replaced_type( $replaced, $submitted, $html, $mail_tag ){ 
   //custom code here
    return $replaced
} 

//add the action 
add_filter('wpcf7_mail_tag_replaced_{$type}', 'custom_wpcf7_mail_tag_replaced_{$type}', 10, 4)

Defined

The filter is defined in the following location(s).

contact-form-7/includes/mail.php

$replaced = apply_filters(
				"wpcf7_mail_tag_replaced_{$type}", $replaced,
				$submitted, $html, $mail_tag
			);