Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ibericode/mailchimp-for-wordpress
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyvankooten committed Apr 25, 2024
2 parents 9d1254a + 14b2e8f commit 7204e9a
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

/**
* This snippet adds the HTML for a MailChimp interest groups to your WooCommerce Registration.
*/
add_action( 'woocommerce_register_form_start', 'mc4wp_show_interest_group_in_registration' );
function mc4wp_show_interest_group_in_registration() { ?>

<!-- Subscription Checkbox -->
<p class="mc4wp-checkbox mc4wp-checkbox-woocommerce">
<label>
<?php //<input type="checkbox" name="_mc4wp_subscribe_woocommerce" value="1"> ?>
<input type="checkbox" name="mc4wp-subscribe" value="1">
<span>Sign me up for the newsletter YAY!</span>
</label>
</p>

<!-- Interest Groups -->
<p class="form-row form-row " id="_mc4wp_subscribe_woocommerce_checkout_field">
<span>Choose the topic of your interest</span><br />
<label class="checkbox ">
<input name="mc4wp-INTERESTS[XXXX][]" type="checkbox" value="ENTER-VALUE"> <span>Theme</span>
<input name="mc4wp-INTERESTS[XXXX][]" type="checkbox" value="ENTER-VALUE"> <span>Plugin</span>
</label>
</p>

<?php
}

0 comments on commit 7204e9a

Please sign in to comment.