Skip to content

Instantly share code, notes, and snippets.

@matheuswd
Created August 31, 2020 15:30
Show Gist options
  • Save matheuswd/beaa52ae8618d6afcaa3fbf28712877c to your computer and use it in GitHub Desktop.
Save matheuswd/beaa52ae8618d6afcaa3fbf28712877c to your computer and use it in GitHub Desktop.
Default the Mailchimp selection to subscribe
<?php
function my_mailchimp_tribute_by_default() { ?>
<script>
jQuery("input[name=give_mailchimp_signup]").prop("checked", true);
</script>
<?php }
add_action( 'give_donation_form_after_submit', 'my_mailchimp_tribute_by_default' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment