Skip to content

Instantly share code, notes, and snippets.

@hannit
Created March 30, 2017 08:30
Show Gist options
  • Save hannit/95ca33352634516aabd2bb64b7d92394 to your computer and use it in GitHub Desktop.
Save hannit/95ca33352634516aabd2bb64b7d92394 to your computer and use it in GitHub Desktop.
CF7 action integration
add_action( 'wpcf7_before_send_mail', 'my_activtrail_cf7_integration' );
function my_activtrail_cf7_integration( $cf7 ) {
$form_id = $_POST['_wpcf7'];
if ($form_id == XXX || $form_id == YYY):
$first_name = $_POST['first_name']; // get form data
...
// Do Something;
endif;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment