Skip to content

Instantly share code, notes, and snippets.

@hostz-frank
Last active February 21, 2025 21:41
Show Gist options
  • Save hostz-frank/600733ddcdbecb70cb1a47b1ef87bca6 to your computer and use it in GitHub Desktop.
Save hostz-frank/600733ddcdbecb70cb1a47b1ef87bca6 to your computer and use it in GitHub Desktop.
Send mail copy to users of Divi's contact form.
<?php
/**
* Send copy to Divi's contact form sender.
*/
add_filter( 'et_contact_page_headers', 'change_et_contact_page_headers', 10, 3 );
function change_et_contact_page_headers( $headers, $contact_name, $contact_email ) {
$headers[] = 'Cc: ' . $contact_email;
return implode( "\n", $headers );
}
@connormesec
Copy link

This solution does not work with Divi > 4.0. I created my own that uses the et_pb_contact_form_submit hook to accomplish the same thing. https://gist.github.com/connormesec/36f75e3e438ac5ad80812bb95f3f15a6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment