Created
June 10, 2020 21:59
-
-
Save rafsuntaskin/41acb8672958ddc58d39866dd1c2ec6e to your computer and use it in GitHub Desktop.
set ticket purchase limit
This file contains hidden or 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 | |
add_filter( 'tribe_tickets_get_ticket_max_purchase', 'rt_limit_max_purchase_et', 20, 2 ); | |
function rt_limit_max_purchase_et( $limit, $ticket ) { | |
$new_limit = 5; | |
if ( $limit < $new_limit ) { | |
return $limit; | |
} | |
return $new_limit; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment