Module::delete_ticket( $event_id,  $ticket_id )

Deletes a ticket or an attendee post.


Parameters

$event_id

(Required)

$ticket_id

(Required)


Top ↑

Return

(bool)


Top ↑

Source

File: src/Tickets/Commerce/Module.php

	public function delete_ticket( $event_id, $ticket_id ) {
		/**
		 * Important, do not add anything above this method.
		 * Our goal is to reduce the amount of load on the `Module`, relegate these behaviors to the correct models.
		 */
		$deleted = tribe( Ticket::class )->delete( $event_id, $ticket_id );

		if ( ! $deleted ) {
			return $deleted;
		}

		// Run anything we might need on parent method.
		parent::delete_ticket( $event_id, $ticket_id );

		return $deleted;
	}

Top ↑

Changelog

Changelog
Version Description
5.5.10 Adjust the method to handle both Ticket and Attendee post type deletion separately.
5.1.9 Introduced.