Tribe__Events__Community__Tickets__Main::disallow_update_ticket_price_message( string $message, WP_Post $ticket )

Filters the no-update message to display when updating tickets is disallowed


Parameters #

$message

(string) (Required) Message to display to user

$ticket

(WP_Post) (Required) Ticket object


Top ↑

Return #

(string)


Top ↑

Source #

File: src/Tribe/Main.php

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

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

		if ( $total_sales ) {
			$message = esc_html__( 'Editing ticket prices is not allowed once purchases have been made.', 'tribe-events-community-tickets' );
		}

		return $message;
	}