-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create add-interest-group-to-woocommerce-registration.php
This snippet adds the HTML for Mailchimp interest groups to your WooCommerce Registration form.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...code-snippets/integrations/woocommerce/add-interest-group-to-woocommerce-registration.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |