The contact-form-7 wpcf7 mail tag replaced {$type} hook.
Published Date - July 22, 2023
$replaced = apply_filters(
"wpcf7_mail_tag_replaced_{$type}", $replaced,
$submitted, $html, $mail_tag
);
$replaced
$submitted
$html
$mail_tag
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)
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
);