-
-
Save Apina/de3c5b6f7ebe89fd16cb to your computer and use it in GitHub Desktop.
Small plugin to make a ticket required by removing the 0 ticket option.
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
<?php | |
/* | |
Plugin Name: EE add JavaScript to make ticket required. | |
Description: | |
*/ | |
/* Begin Adding Functions Below This Line */ | |
function ee_1() { | |
if(is_singular('espresso_events')) { | |
?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function() { | |
//Change the ID (ticket-selector-tbl-qty-slct-1680-1 in this case) to match the correct ticket. | |
jQuery('#ticket-selector-tbl-qty-slct-1680-1 option[value="0"]').remove(); | |
}); | |
</script> | |
<?php | |
} | |
} | |
add_action('wp_footer', 'ee_1', 100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment