Skip to content

Instantly share code, notes, and snippets.

@matheuswd
Last active April 8, 2021 15:40
Show Gist options
  • Save matheuswd/19e96de934e922f1732c20b545d79955 to your computer and use it in GitHub Desktop.
Save matheuswd/19e96de934e922f1732c20b545d79955 to your computer and use it in GitHub Desktop.
This code forces an account creation for GiveWP when account creation is enabled
<?php
function my_checked_create_account() { ?>
<script>
jQuery("input[name=give_create_account]").prop("checked", true);
</script>
<?php }
add_action( 'give_donation_form_after_submit', 'my_checked_create_account' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment