Created
September 7, 2018 17:10
-
-
Save joshfeck/b9fc5928507721bb90dd470ebcbe00fe to your computer and use it in GitHub Desktop.
Event Espresso 4: show only the first ticket option that's on sale
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 | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
add_action( | |
'wp_enqueue_scripts', | |
'my_ee_show_only_first_on_sale_ticket', | |
20 | |
); | |
function my_ee_show_only_first_on_sale_ticket() { | |
$custom_js = 'jQuery(document).ready(function($){ | |
$(".tckt-slctr-tbl-tr").hide(); | |
$(".ticket-on-sale:first").show(); | |
});'; | |
wp_add_inline_script('ticket_selector', $custom_js); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment