Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dparker1005/6512b9e6a4c6350d6ffbc85fdc83251e to your computer and use it in GitHub Desktop.
Save dparker1005/6512b9e6a4c6350d6ffbc85fdc83251e to your computer and use it in GitHub Desktop.
Adds a hint to the first and last name fields at checkout.
<?php
// Copy from below here
function my_pmpro_add_name_checkout_hints() {
?>
<script>
jQuery("#bfirstname").parent().append("<p><small class='lite'>I am a hint for first name.</small></p>");
jQuery("#blastname").parent().append("<p><small class='lite'>I am a hint for last name.</small></p>");
</script>
<?php
}
add_action( 'pmpro_checkout_after_billing_fields', 'my_pmpro_add_name_checkout_hints' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment