Created
March 31, 2022 16:34
-
-
Save rafsuntaskin/eac255549621620a8965e82fec39ae27 to your computer and use it in GitHub Desktop.
limit RSVP max purchases for ET
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', 'et_set_max_rsvp_purchase_limit', 10, 4 ); | |
function et_set_max_rsvp_purchase_limit( $available_at_a_time, $ticket, $event, $ticket_id ) { | |
if ( $available_at_a_time <= 1 || $ticket->provider_class != 'Tribe__Tickets__RSVP' ) { | |
return $available_at_a_time; | |
} | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment