Tribe__Tickets_Plus__Commerce__EDD__Main::ticket_downloads( array $files = array(), int $download_id, int $unused_price_id = null )

Trick EDD into thinking the ticket has a download file. If one already exists, we need not add another.


Parameters

$files

(array) (Optional)

Default value: array()

$download_id

(int) (Required)

$unused_price_id

(int) (Optional)

Default value: null


Top ↑

Return

(array)


Top ↑

Source

File: src/Tribe/Commerce/EDD/Main.php

	public function ticket_downloads( $files = array(), $download_id = 0, $unused_price_id = null ) {
		// Determine if this is a ticket product or if it already has a download file
		if ( ! get_post_meta( $download_id, $this->event_key, true ) ) {
			return $files;
		}

		if ( ! empty( $files ) ) {
			return $files;
		}

		$files[] = array(
			'name' => __( 'Print Ticket', 'event-tickets-plus' ),
			'file' => self::TICKET_DOWNLOAD,
		);

		return $files;
	}