Tribe__Tickets__RSVP::parse_ticket_quantity( int $ticket_id )
Parses the quantity of tickets requested for a product via the $_POST var.
Contents
Parameters
- $ticket_id
-
(int) (Required) The ticket ID.
Return
(int) Either the requested quantity of tickets or 0 in any other case.
Source
File: src/Tribe/RSVP.php
public function parse_ticket_quantity( $product_id ) {
if ( empty( $_POST[ "quantity_{$product_id}" ] ) ) {
return 0;
}
return (int) $_POST[ "quantity_{$product_id}" ];
}
Changelog
| Version | Description |
|---|---|
| 4.7 | Introduced. |