Tribe__Tickets__Tickets::process_rsvp_counts( Tribe__Tickets__Ticket_Object $rsvp, array $types )
Process RSVP counts.
Contents
Parameters
- $rsvp
-
(Tribe__Tickets__Ticket_Object) (Required) RSVP ticket object.
- $types
-
(array) (Required) Array of ticket types.
Return
(array)
Source
File: src/Tribe/Tickets.php
public static function process_rsvp_counts( $rsvp, $types ) {
$types['rsvp']['count'] ++;
$types['rsvp']['stock'] += $rsvp->stock;
if ( 0 !== $types['rsvp']['stock'] ) {
$types['rsvp']['available'] ++;
}
if ( ! $rsvp->manage_stock() ) {
$types['rsvp']['unlimited'] ++;
$types['rsvp']['available'] ++;
}
return $types;
}
Changelog
| Version | Description |
|---|---|
| 5.5.9 | Introduced. |