WordPress filter hook
wpcf7_additional_mail
Fired by 5 WordPress plugins, running on 10M+ sites between them.
How to use wpcf7_additional_mail
It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'wpcf7_additional_mail', function( $additional_mail, $contact_form_data ) {
// Change $additional_mail here.
return $additional_mail;
}, 10, 2 );Argument names come from Track Geolocation Of Users Using Contact Form 7's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
5 plugins that fire wpcf7_additional_mail
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Contact Form 710+ million installs
apply_filters( 'wpcf7_additional_mail', $additional_mail, $contact_form )includes/submission.php:751 -
Track Geolocation Of Users Using Contact Form 7800+ installs
apply_filters( 'wpcf7_additional_mail', $additional_mail, $contact_form_data )inc/lib/class.tglcf.lib.php:286 -
Accept PayPal Payments using Contact Form 7500+ installs
apply_filters( 'wpcf7_additional_mail', $additional_mail, $contact_form_data )inc/lib/class.cf7pe.lib.php:1101 -
Accept SagePay Payments Using Contact Form 710+ installs
apply_filters( 'wpcf7_additional_mail', $additional_mail, $contact_form_data )inc/lib/class.cfspzw.lib.php:334 -
AscueFewer than 10 installs
apply_filters( 'wpcf7_additional_mail', $additional_mail, $contact_form )includes/integrations/class-ascue-integration-cf7.php:160
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.