Ticket::get_sale_price( int $ticket_id )
Get the sale price of a ticket.
Contents
Parameters
- $ticket_id
-
(int) (Required) The ticket post ID.
Return
(string) The sale price of the ticket.
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() : '';
}
Changelog
| Version | Description |
|---|---|
| 5.9.0 | Introduced. |