Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Last active January 25, 2016 18:53
Show Gist options
  • Save joshfeck/3b76f817378162b9601c to your computer and use it in GitHub Desktop.
Save joshfeck/3b76f817378162b9601c to your computer and use it in GitHub Desktop.
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function add_groupon_message_to_promo_input() {
?>
<script>
jQuery( document ).on('ajaxComplete ready', function() {
jQuery('div#ee-single-page-checkout-dv input#ee-promotion-code-input')
.attr('placeholder', 'if you have a voucher, type "GROUPON" here');
jQuery('div#ee-single-page-checkout-dv #ee-promotion-code-input-lbl em')
.remove();
jQuery('div#ee-single-page-checkout-dv #ee-promotion-code-input-lbl')
.prepend('<div><em>Please Note: If you have a voucher, type "GROUPON" in the field below</em></div>').css('margin-top', '-26px');
});
</script>
<?php
}
add_action( 'AHEE__payment_options__reg_step_start', 'add_groupon_message_to_promo_input' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment