Ticket::get_sale_price( int $ticket_id )

Get the sale price of a ticket.


Parameters

$ticket_id

(int) (Required) The ticket post ID.


Top ↑

Return

(string) The sale price of the ticket.


Top ↑

Source

File: src/Tickets/Commerce/Ticket.php

	public function get_sale_price( int $ticket_id ): string {
		$sale_price = get_post_meta( $ticket_id, static::$sale_price_key, true );
		return $sale_price instanceof Value ? $sale_price->get_string() : '';
	}

Top ↑

Changelog

Changelog
Version Description
5.9.0 Introduced.