Skip to content

Instantly share code, notes, and snippets.

@matheuswd
Created August 6, 2020 17:11
Show Gist options
  • Save matheuswd/fc466e133852914c06ad59fc82dbc5d2 to your computer and use it in GitHub Desktop.
Save matheuswd/fc466e133852914c06ad59fc82dbc5d2 to your computer and use it in GitHub Desktop.
Makes the amount field blank and focused
<?php
function change_amount_focus() { ?>
<script>
jQuery("#give-amount").val("").focus();
</script>
<?php }
add_action( 'give_payment_mode_top', 'change_amount_focus' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment