Hi @idahsto8,
You can change your contact form 7 forms to single opt-in using the following snippet:
add_filter(
'yikes-mailchimp-checkbox-integration-body',
function ( $request_body, $integration_type ) {
$request_body['status_if_new'] = 'subscribed';
$request_body['status'] = 'subscribed';
return $request_body;
},
10,
2
);
Thanks,
Jon
Plugin Contributor
Tracy Levesque
(@liljimmi)
🏳️🌈 YIKES, Inc. Co-Owner
Hi @idahsto8
If you’re not comfortable adding that code to your functions.php file, you can use this plugin https://ww.wp.xz.cn/plugins/my-custom-functions/
Let us know if you need further help.
Thank you!
-Tracy
Thank you! I’d probably prefer to edit functions.php myself, if you can provide a few additional details? Where within the file do I need to place code… or can it go anywhere in there? thanks!
Plugin Contributor
Tracy Levesque
(@liljimmi)
🏳️🌈 YIKES, Inc. Co-Owner
Hi @idahsto8
You can place it at the very end of the file, unless there is a closing PHP tag at the end, then it needs to go above that.
Thank you.
-Tracy