Custom plugin contact form connecting to mailchimp API

Change your code like this // Enter here the MailChimp API key $apiKey = “”; // Enter here Mailchimp list id $list_id = “”; $server = explode( ‘-‘, $apiKey ); $url=”https://” . $server[1] . ‘.api.mailchimp.com/3.0/lists/’ . $list_id . ‘/members/’; $response = wp_remote_post( $url, [ ‘method’ => ‘POST’, ‘data_format’ => ‘body’, ‘timeout’ => 45, ‘headers’ => … Read more