Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save FinalDestiny/5f19e17299947e688a59a6d0a128c0c0 to your computer and use it in GitHub Desktop.
Save FinalDestiny/5f19e17299947e688a59a6d0a128c0c0 to your computer and use it in GitHub Desktop.
Locate this piece of code:
wp_mail( apply_filters( 'et_contact_page_email_to', $contact_email ),
et_get_safe_localization( sprintf(
__( 'New Message From %1$s%2$s', 'et_builder' ),
sanitize_text_field( html_entity_decode( $et_site_name, ENT_QUOTES, 'UTF-8' ) ),
( '' !== $title ? sprintf( _x( ' - %s', 'contact form title separator', 'et_builder' ), sanitize_text_field( html_entity_decode( $title, ENT_QUOTES, 'UTF-8' ) ) ) : '' )
) ),
! empty( $email_message ) ? $email_message : ' ',
apply_filters( 'et_contact_page_headers', $headers, $contact_name, $contact_email )
);
Replace that code with:
$email_message2 = "Thank you for reaching out to us. Your message has been received and we'll get back to you shortly. \n\n" . $email_message;
wp_mail( apply_filters( 'et_contact_page_email_to', $contact_email ),
et_get_safe_localization( sprintf(
__( 'New Message From %1$s%2$s', 'et_builder' ),
sanitize_text_field( html_entity_decode( $et_site_name, ENT_QUOTES, 'UTF-8' ) ),
( '' !== $title ? sprintf( _x( ' - %s', 'contact form title separator', 'et_builder' ), sanitize_text_field( html_entity_decode( $title, ENT_QUOTES, 'UTF-8' ) ) ) : '' )
) ),
! empty( $email_message ) ? $email_message2 : ' ',
apply_filters( 'et_contact_page_headers', $headers, $contact_name, $contact_email )
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment