Tribe__Tickets_Plus__Meta::cart_has_required_meta( array $cart_tickets )

Checks whether any of the cart tickets has required meta.


Parameters

$cart_tickets

(array) (Required) The array containing the cart elements. Format array( 'ticket_id' => 'quantity' ).


Top ↑

Return

(bool) Whether any of the cart tickets has required meta.


Top ↑

Source

File: src/Tribe/Meta.php

	public function cart_has_required_meta( $cart_tickets ) {

		// Bail if we don't receive an array
		if ( ! is_array( $cart_tickets ) ) {
			return false;
		}

 		// Bail if we receive an empty array
 		if ( empty( $cart_tickets ) ) {
	 		return false;
 		}

 		foreach ( $cart_tickets as $ticket_id => $quantity ) {
	 		if ( $this->ticket_has_required_meta( $ticket_id ) ) {
				return true;
			}
	 	}

	 	return false;

	}

Top ↑

Changelog

Changelog
Version Description
4.9 Introduced.