Ловите событие перед отправкой сообщения:
<?
add_action('wpcf7_before_send_mail', 'save_form' );
function save_form( $wpcf7 ) {
global $wpdb;
/*
Note: since version 3.9 Contact Form 7 has removed $wpcf7->posted_data
and now we use an API to get the posted data.
*/
$submission = WPCF7_Submission::get_instance();
if ( $submission ) {
$submited = array();
$submited['title'] = $wpcf7->title();
$submited['posted_data'] = $submission->get_posted_data();
}
$data = array(
'name' => $submited['posted_data']['name'],
'email' => $submited['posted_data']['email']
);
}
Источник:
wptips.me/contact-form-7-save-submited-data-in-the...