Skip to content

Instantly share code, notes, and snippets.

@codingmusician
Last active January 11, 2022 17:58
Show Gist options
  • Save codingmusician/85433fe0266320473460b3270cf70d48 to your computer and use it in GitHub Desktop.
Save codingmusician/85433fe0266320473460b3270cf70d48 to your computer and use it in GitHub Desktop.
<?php
function tec_max_tickets_allowed() {
if ( ! function_exists( 'tribe_is_event' ) || ! tribe_is_event() ) {
return false;
}
?>
<script>
jQuery( function( $ ){
if( $(".tribe-ticket-quantity").length ){
$(".tribe-ticket-quantity").attr("max", 1);
}
} );
</script>
<?php
}
add_action("wp_footer", "tec_max_tickets_allowed");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment