Created
May 9, 2019 17:12
-
-
Save LMNTL/682b9135360e8cb7a39972690560e240 to your computer and use it in GitHub Desktop.
Always show the top discount code field on the checkout page for Paid Memberships Pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Always show the top discount code field on the checkout page for Paid Memberships Pro | |
function my_pmpro_always_show_discount_code() | |
{ | |
?> | |
<script> | |
jQuery(document).ready(function() { | |
jQuery('#other_discount_code_tr').show(); | |
jQuery('#other_discount_code_p').hide(); | |
jQuery('#other_discount_code').focus(); | |
}); | |
</script> | |
<?php | |
} | |
add_action('pmpro_checkout_before_submit_button', "my_pmpro_always_show_discount_code"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment