WordPress filter hook

wpcf7_special_mail_tags

Fired by 24 WordPress plugins, running on 10.3M+ sites between them.

How to use wpcf7_special_mail_tags

It's a filter: your callback receives the value and 3 more arguments, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'wpcf7_special_mail_tags', function( $value, $tagname, $arg3, $mail_tag ) {
	// Change $value here.
	return $value;
}, 10, 4 );

Argument names come from GSheetConnector's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

24 plugins that fire wpcf7_special_mail_tags

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. Contact Form 7 icon Contact Form 710+ million installs apply_filters( 'wpcf7_special_mail_tags', null, $mail_tag->tag_name(), $html, $mail_tag ) includes/mail.php:632
  2. Redirection for Contact Form 7 icon Redirection for Contact Form 7200,000+ installs apply_filters( 'wpcf7_special_mail_tags', null, $mail_tag->field_name(), $template, $mail_tag ) classes/actions/class-wpcf7r-action-send-to-api.php:187
  3. GSheetConnector icon GSheetConnector40,000+ installs apply_filters( 'wpcf7_special_mail_tags', '', $tagname, false, $mail_tag ) includes/class-gs-service.php:2563
  4. Connect Contact Form 7 to Mailchimp, Brevo, MailerLite, Klaviyo, GetResponse, EmailOctopus, Campaign Monitor & Moosend icon Connect Contact Form 7 to Mailchimp, Brevo, MailerLite, Klaviyo, GetResponse, EmailOctopus, Campaign Monitor & Moosend40,000+ installs apply_filters( 'wpcf7_special_mail_tags', '', $matches[1], false, $mail_tag ) src/Submission/FieldValues.php:96
  5. CF7 to Webhook icon CF7 to Webhook30,000+ installs apply_filters( 'wpcf7_special_mail_tags', '', $mail_tag->tag_name(), false, $mail_tag ) modules/cf7/class-module-cf7.php:690
  6. WP Webhooks Automation icon WP Webhooks Automation20,000+ installs apply_filters( 'wpcf7_special_mail_tags', '', $special_tag_name, false, $mail_tag ) core/includes/integrations/contactform7/helpers/form_helpers.php:284
  7. WSMS (formerly WP SMS): SMS Notifications, OTP Login and WooCommerce SMS icon WSMS (formerly WP SMS): SMS Notifications, OTP Login and WooCommerce SMS7,000+ installs apply_filters( 'wpcf7_special_mail_tags', null, $tag, '', new \WPCF7_MailTag($tag, 'text', $tag) ) includes/class-wpsms-integrations.php:158
  8. Form data to kintone icon Form data to kintone1,000+ installs apply_filters( 'wpcf7_special_mail_tags', null, $cf7_mail_tag, false, $mail_tag ) modules/checkbox.php:48
  9. Contact Form to Brevo icon Contact Form to Brevo1,000+ installs apply_filters( 'wpcf7_special_mail_tags', '', $value, false ) inc/Base/CFB_PSD_Subscribe.php:90
  10. Contact Form 7 GetResponse Extension icon Contact Form 7 GetResponse Extension1,000+ installs apply_filters( 'wpcf7_special_mail_tags', '', $matches[1] ) public/class-cf7-gr-ext-public.php:84
  11. Contact Form 7 Campaign Monitor Extension icon Contact Form 7 Campaign Monitor Extension900+ installs apply_filters( 'wpcf7_special_mail_tags', '', $field_name ) includes/functions.php:793
  12. Connect Contact Form 7 and AWeber icon Connect Contact Form 7 and AWeber300+ installs apply_filters( 'wpcf7_special_mail_tags', '', $matches[1], false ) includes/services/class-icf7a-subscriber.php:300
  13. Integration with Google Sheets for Contact Form 7 icon Integration with Google Sheets for Contact Form 7300+ installs apply_filters( 'wpcf7_special_mail_tags', '', $tagname, false, $mail_tag ) service.php:171
  14. CompactForm icon CompactForm200+ installs apply_filters( 'wpcf7_special_mail_tags', '', $tagname, false, $mail_tag ) includes/extensions/class-webhook.php:389
  15. Webhook Configuration CF7 icon Webhook Configuration CF7100+ installs apply_filters( 'wpcf7_special_mail_tags', '', $mail_tag->tag_name(), false, $mail_tag ) modules/cf7/class-wcc-module-cf7.php:503
  16. Teligro icon Teligro100+ installs apply_filters( 'wpcf7_special_mail_tags', '', sprintf( '_%s', $smt ), false ) plugins/ContactForm7.php:154
  17. WP Webhooks icon WP Webhooks100+ installs apply_filters( 'wpcf7_special_mail_tags', '', $special_tag_name, false, $mail_tag ) wpwh-cf7.php:277
  18. Contact Form 7 icon Contact Form 790+ installs apply_filters( 'wpcf7_special_mail_tags', '', $matches[1] ) cf7-campaignmonitor.php:254
  19. Contact Form Dashboard icon Contact Form Dashboard70+ installs apply_filters( 'wpcf7_special_mail_tags', '', '_' . $smt, false ) setting.php:66
  20. FMPress Forms icon FMPress Forms40+ installs apply_filters( 'wpcf7_special_mail_tags', null, $tagname, false, $mail_tag ) includes/class-forms.php:550
  21. Gwebpro Contact Form 7 MailChimp Extension icon Gwebpro Contact Form 7 MailChimp Extension30+ installs apply_filters( 'wpcf7_special_mail_tags', '', $matches[1] ) lib/functions.php:256
  22. CF7 LACRM Connector icon CF7 LACRM Connector20+ installs apply_filters( 'wpcf7_special_mail_tags', '', $tagname, $html ) includes/class-lacrm-service.php:602
  23. Form Integration for Action Network and Contact Form 7 icon Form Integration for Action Network and Contact Form 710+ installs apply_filters( 'wpcf7_special_mail_tags', '', $mail_tag->tag_name(), false, $mail_tag ) modules/cf7/class-module-cf7.php:623
  24. Message Hub icon Message HubFewer than 10 installs apply_filters( 'wpcf7_special_mail_tags', '', sprintf( '_%s', $smt ), false ) includes/wpcf7.php:66

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.