Ok, that means that it’s really working as it should. You should have received an opt-in email. Only after confirming the opt-in the email will show in your Mailchimp audience.
For form ID recognition the code would look like this:
<?php
// The problem with WPForms forms in this regard is that it generates field names that aren't always easy for our plugin to recognize.
// You will have to inspect the source of the form to find field names (name="...") for each field and manually map them as such:
add_filter( 'mc4wp_integration_wpforms_subscriber_data', function( MC4WP_MailChimp_Subscriber $subscriber ) {
if($_POST['wpforms[id]'] == "1234") {
$subscriber->merge_fields[ "FNAME" ] = sanitize_text_field( $_POST['wpforms[fields][7][first]'] );
$subscriber->merge_fields[ "COUNTRY" ] = sanitize_text_field( $_POST['wpforms[fields][7][country]'] );
}
if($_POST['wpforms[id]'] == "5678") {
$subscriber->merge_fields[ "FNAME" ] = sanitize_text_field( $_POST['wpforms[fields][8][first]'] );
$subscriber->merge_fields[ "COUNTRY" ] = sanitize_text_field( $_POST['wpforms[fields][8][country]'] );
}
return $subscriber;
});