Tribe__Tickets__Tickets::get_tickets_in_cart_for_provider( null|string|false $provider = null )
Get list of tickets in cart for a specific provider.
Contents
Parameters
- $provider
-
(null|string|false) (Optional) The provider slug or false if no provider, leave as null to detect from page.
Default value: null
Return
(array) List of tickets in cart for the provider.
Source
File: src/Tribe/Tickets.php
public static function get_tickets_in_cart_for_provider( $provider = null ) { if ( null === $provider ) { $provider = tribe_get_request_var( 'provider', false ); } /** * Filter to add/remove tickets from the global cart. * * @since 4.9 * @since 4.11.0 Added $provider to allow context of current provider. * * @param array $tickets_in_cart The array containing the cart elements. Format array( 'ticket_id' => 'quantity' ). * @param string|false $provider Current ticket provider or false if not set. */ return (array) apply_filters( 'tribe_tickets_tickets_in_cart', [], $provider ); }
Changelog
Version | Description |
---|---|
5.0.3 | Introduced. |