Single Optin code in Cf7 Integration not working
-
Hi,
I have read through the forum and documentation about making the Contact Form 7 Integration be single optin, I’ve pasted the code described here https://yikesplugins.com/support/knowledge-base/how-do-i-change-the-checkbox-integrations-to-single-opt-in/ to the functions.php file and everything else is working perfectly, even the code to map the other fields like first name and last name but the double opt in email keeps arriving. Any thoughts on what it could be?Thanks a lot
The current php file code looks like this, and it sits at the bottom of the file:
function YIKES_cf7_integration_single_optin( $request_args, $integration_type ) {
if( ‘contact_form_7’ == $integration_type ) {
$request_args[‘double_optin’] = 0;
}
return $request_args;
}
add_filter( ‘yikes-mailchimp-checkbox-integration-subscibe-api-request’, ‘YIKES_cf7_integration_single_optin’ );
add_filter( ‘yikes-mailchimp-checkbox-integration-subscribe-api-request’, ‘YIKES_cf7_integration_single_optin’ );function additional_contact_form_7_data( $merge_variables, $cf7_data ) {
$first_name = $cf7_data[‘your-name’];
$last_name = $cf7_data[‘your-lastname’];
$tel = $cf7_data[‘tel’];
$merge_variables = array(
‘FNAME’ => $first_name,
‘LNAME’ => $last_name,
‘MMERGE3’ => $tel,
);
return $merge_variables;
}
add_filter( ‘yikes-mailchimp-contact-form-7’, ‘additional_contact_form_7_data’, 10, 2 );
- The topic ‘Single Optin code in Cf7 Integration not working’ is closed to new replies.