Skip to content

Instantly share code, notes, and snippets.

@cliffordp
cliffordp / functions.php
Last active January 19, 2020 21:47
Event Tickets (ET): Limit each logged-in user to a maximum purchase quantity per event.
<?php
/**
* Event Tickets (ET): Limit each logged-in user to a maximum purchase quantity per event.
*
* !!! Change the maximum to your own value!!!
* Requires ET version 4.11.1 or later, since that's when front-end ticket inputs fully supported this filter.
*
* @link https://gist.github.com/cliffordp/009f0b5f9cda516368545957eaf8543e This snippet.
* @link https://docs.theeventscalendar.com/reference/hooks/tribe_tickets_get_ticket_max_purchase/ This filter.