wpcf7_collect_mail_tags

The contact-form-7 wpcf7 collect mail tags hook.

Published Date - July 22, 2023

Description

return apply_filters( 'wpcf7_collect_mail_tags', $mailtags, $args, $this );

Parameters

  1. $mailtags

  2. $args

  3. $instance


Usage

The following example is for adding a hook callback.

// define the wpcf7_collect_mail_tags callback 
function custom_wpcf7_collect_mail_tags( $mailtags, $args, $instance ){ 
   //custom code here
    return $mailtags
} 

//add the action 
add_filter('wpcf7_collect_mail_tags', 'custom_wpcf7_collect_mail_tags', 10, 3)

Defined

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

contact-form-7/includes/contact-form.php

return apply_filters( 'wpcf7_collect_mail_tags', $mailtags, $args, $this );