Interest groups radio buttons in Checkout page
-
Hello,
I’m trying to add Mailchimp interest groups (Language – Italian or English) to a Checkout subscription form.
Following some examples online, I managed to display the subscribe checkbox with radio buttons for the interest groups.
But when I test it, the email is subscribed to my Mailchimp with no group at all.
The debug log does not display any error, and I tried to change the “Update existing subscribers?” and/or “Replace interest groups?” preferences in the Integrations > Woocommerce section, but nothing solved my issue.
I added this to my functions.php, but I can’t get what I’ve done wrong.add_filter( 'mc4wp_integration_show_checkbox', 'mc4wp_show_interest_group_in_checkout' ); function mc4wp_show_interest_group_in_checkout() { ?> <p class="mc4wp-checkbox mc4wp-checkbox-woocommerce form-row form-row-wide woocommerce-validated"> px <label> <?php //<input type="checkbox" name="_mc4wp_subscribe_woocommerce" value="1"> ?> <input type="checkbox" name="_mc4wp_subscribe_woocommerce" value="1" class="input-checkbox"> <span>Voglio anche iscrivermi alla newsletter per ricevere sconti e novità esclusive</span> </label> </p> <!-- Interest Groups --> <p class="form-row form-row " id="_mc4wp_subscribe_woocommerce_checkout_field" style="margin-top:-2em"> <label>Linguaggio: </label> <label> <input name="mc4wp-INTERESTS[5d4daad2e9]" type="radio" value="2b9a4d01bc"> Italiano </label> <label> <input name="mc4wp-INTERESTS[5d4daad2e9]" type="radio" value="d590a2666d"> English </label> </p> <?php }
This is the page where I need help: https://bit.ly/3CKRv57
Code reference:
https://bit.ly/3IKlwGa
https://bit.ly/3W0kVTC
https://bit.ly/3W8k1VhThe page I need help with: [log in to see the link]
- The topic ‘Interest groups radio buttons in Checkout page’ is closed to new replies.