Ticket::get_price( Tribe__Tickets__Ticket_Object $ticket )
Get the price of a ticket.
Contents
Parameters
- $ticket
-
(Tribe__Tickets__Ticket_Object) (Required) The ticket object.
Return
(string) The price of the ticket.
Source
File: src/Tickets/Commerce/Ticket.php
public function get_price( Ticket_Object $ticket ): string {
if ( $ticket->on_sale ) {
return $this->get_sale_price( $ticket->ID );
}
return $this->get_regular_price( $ticket->ID );
}
Changelog
| Version | Description |
|---|---|
| 5.9.0 | Introduced. |