Tribe__Events__Community__Tickets__Main::can_update_ticket_price( boolean $can_update, WP_Post $ticket )

Filters whether or not the ticket price can be updated


Parameters #

$can_update

(boolean) (Required) Can the ticket price be updated?

$ticket

(WP_Post) (Required) Ticket object


Top ↑

Return #

(boolean)


Top ↑

Source #

File: src/Tribe/Main.php

	public function can_update_ticket_price( $can_update, $ticket ) {
		if ( empty( $ticket->ID ) ) {
			return $can_update;
		}

		$total_sales = get_post_meta( $ticket->ID, 'total_sales', true );

		if ( $total_sales ) {
			$can_update = false;
		}

		return $can_update;
	}