Support

Home Forums Community Forum change ticket selector table header text

change ticket selector table header text

Posted: December 16, 2014 at 2:38 pm


Simon Cossar

December 16, 2014 at 2:38 pm

Hi, I’m using WordPress version 4.0.1 and eventsespresso 4.4.6.
How can I change the text in the for the ticket-selector table header. It currently says ‘Available Tickets’ and I need it to say ‘Available Classes’.

Thanks,
Simon


Simon Cossar

December 16, 2014 at 9:10 pm

It can be done by hooking into the ‘gettext’ filter. Something like this will work:
function sc_change_ticket_selector_header_text($translated, $original, $domain) {
if (‘event_espresso’ !== $domain) {
return $translated; // not your text
}
// find the text to change
switch ($original) {
case ‘Available Tickets’ :
return ‘Available Classes’;
default:
return $translated;
}
}
add_filter(‘gettext’, ‘sc_change_ticket_selector_header_text’, 20, 3);
`

see here for more info.

There is also a filter applied directly to each of the table headers in ticket_selector_chart.template.php, so it could be approached that way as well.

The support post ‘change ticket selector table header text’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso