Tribe__Tickets__RSVP::parse_ticket_quantity( int $ticket_id )

Parses the quantity of tickets requested for a product via the $_POST var.


Parameters

$ticket_id

(int) (Required) The ticket ID.


Top ↑

Return

(int) Either the requested quantity of tickets or 0 in any other case.


Top ↑

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}" ];
	}

Top ↑

Changelog

Changelog
Version Description
4.7 Introduced.