Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Event Espresso 4: show only the first ticket option that's on sale
<?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
You can’t perform that action at this time.