[ad_1]
Plugin Contributor
Lap
(@lapzor)
Hi,
I assume you’re using the custom integration method?
The form ID won’t be available via an action argument, but it will e available via $_POST[‘_hf_form_id’]
add_filter( 'mc4wp_integration_woocommerce_subscriber_data', function( MC4WP_MailChimp_Subscriber $subscriber ) {
if (isset($_POST['_hf_form_id']) && $_POST['_hf_form_id'] == 250328) {
$subscriber->tags[] = 'Tag 1';
} else if (isset($_POST['_hf_form_id']) && $_POST['_hf_form_id'] == 250329) {
$subscriber->tags[] = 'Tag 2';
}
return $subscriber;
});Hope that helps. If you have any questions, please let me know!
