Guys who understand PHP, help, please.
It is necessary to fasten Mailchimp to ContactForm7, I found a method, but it does not work for me. There is an assumption that this is due to the fact that Mailchimp has updated the API.
The method uses MCAPI v1.3.1, and the MCAPI version v1.3.2 is available on the mailchamp site ( link to file ).
Here is the code:
function wpcf7_send_to_mailchimp($cfdata) { $formtitle = $cfdata->title; $formdata = $cfdata->posted_data; $send_this_email = $formdata['your-email']; $mergeVars = array( 'FNAME'=>$formdata['your-first-name'], 'LNAME'=>$formdata['your-last-name'], 'GROUPINGS'=>array( array('name'=>'Form Used', 'groups'=>$formtitle), )); // MCAPI.class.php needs to be in theme folder require_once('MCAPI.class.php'); // grab an API Key from http://admin.mailchimp.com/account/api/ $api = new MCAPI('--------API KEY---------'); // grab your List's Unique Id by going to http://admin.mailchimp.com/lists/ // Click the "settings" link for the list - the Unique Id is at the bottom of that page. $list_id = "---------Unique ID---------"; // Send the form content to MailChimp List without double opt-in $retval = $api->listSubscribe($list_id, $send_this_email, $mergeVars, 'html', false); } add_action('wpcf7_mail_sent', 'wpcf7_send_to_mailchimp', 1); Everything is done on wordpress. I insert the code in the functions of the theme, and the MCAPI file v1.3.2 lies in the theme folder, in the same place as the functions.php file.