Skip to content

Instantly share code, notes, and snippets.

@mikka23
Created June 18, 2021 12:56
Show Gist options
  • Save mikka23/990f8c7b0a1d1365eb4ed77e1f40e937 to your computer and use it in GitHub Desktop.
Save mikka23/990f8c7b0a1d1365eb4ed77e1f40e937 to your computer and use it in GitHub Desktop.
Send a reply
<?php
// Action to handle Fusion Form Data.
add_action( 'fusion_form_submission_data', 'fusion_handle_form_data', 10, 2 );
function fusion_handle_form_data( $data, $id ) {
/* IMPORTANT: Replace email_address with your field name. */
$email = $data['data']['email_address'];
/**
*
* You can get data of any field same way by replacing key value in array -> $data['data']['FIELD_NAME']
*
*/
// Send an email. Basic usage example.
wp_mail( $email, 'Avada Enquiry Confirmation', 'Thank you for your enquiry, we will get back to you shortly.' );
}
@mikka23
Copy link
Author

mikka23 commented Apr 21, 2022

Hi Lesley. The code is no longer needed. In 7.7 the ability to set your own emails (and have multiple) was added. So you can add auto responder emails to each form via the builder now.

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