Ticket::get_sale_price_details( int $ticket_id )
Get the sale price details for a ticket.
Contents
Parameters
- $ticket_id
-
(int) (Required) The ticket post ID.
Return
(TECTicketsCommercearray<string,string>) The sale price details.
Source
File: src/Tickets/Commerce/Ticket.php
public function get_sale_price_details( int $ticket_id ): array {
return [
'enabled' => get_post_meta( $ticket_id, static::$sale_price_checked_key, true ),
'sale_price' => $this->get_sale_price( $ticket_id ),
'start_date' => get_post_meta( $ticket_id, static::$sale_price_start_date_key, true ),
'end_date' => get_post_meta( $ticket_id, static::$sale_price_end_date_key, true ),
];
}
Changelog
| Version | Description |
|---|---|
| 5.9.0 | Introduced. |