Tribe__Events__Community__Tickets__Gateway__Abstract::ticket_price( int $price, boolean $calculate_percentage_fee = false )

Computes the price of a ticket based on the gateway’s percentage, site percentage, etc.


Parameters

$price

(int) (Required) Price of the actual ticket.

$calculate_percentage_fee

(boolean) (Optional) Calculate percentage fee.

Default value: false


Top ↑

Return

(float)


Top ↑

Source

File: src/Tribe/Gateway/Abstract.php

	public function ticket_price( $price, $calculate_percentage_fee = false ) {
		$percentage = 0;

		if ( $calculate_percentage_fee ) {
			$percentage = $this->fee_percentage();
		}

		$total = round( $price / 100 * ( 100 - $percentage ), 2 );

		return $total;
	}