IAC::get_iac_setting_label_for_ticket( Tribe__Tickets__Ticket_Object|int $ticket, bool $show_none = true )
Get the IAC setting label for a ticket.
Contents
Parameters
- $ticket
-
(Tribe__Tickets__Ticket_Object|int) (Required) The ticket object or ID.
- $show_none
-
(bool) (Optional) Whether to show the label for 'none'.
Default value: true
Return
(string) The IAC setting label for a ticket.
Source
File: src/Tribe/Attendee_Registration/IAC.php
public function get_iac_setting_label_for_ticket( $ticket, $show_none = true ) {
$label = '';
$setting = $this->get_iac_setting_for_ticket( $ticket );
// If setting is none and we don't want to show it.
if ( ! $show_none && self::NONE_KEY === $setting ) {
return $label;
}
$options = $this->get_iac_setting_options();
$label = isset( $options[ $setting ] ) ? $options[ $setting ] : $label;
return apply_filters( 'tribe_tickets_plus_attendee_registration_iac_setting_label_for_ticket', $label, $ticket );
}
Changelog
| Version | Description |
|---|---|
| 5.1.0 | Introduced. |