wpcf7_mail_tag_replaced

The contact-form-7 wpcf7 mail tag replaced hook.

Published Date - July 22, 2023

Description

$replaced = apply_filters(
			'wpcf7_mail_tag_replaced', $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 callback 
function custom_wpcf7_mail_tag_replaced( $replaced, $submitted, $html, $mail_tag ){ 
   //custom code here
    return $replaced
} 

//add the action 
add_filter('wpcf7_mail_tag_replaced', 'custom_wpcf7_mail_tag_replaced', 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', $replaced,
			$submitted, $html, $mail_tag
		);