Posted: September 14, 2014 at 3:49 pm
|
In addition to attendees, I’m setting up EE4 to accept registration of table space for vendor and exhibitors. It looks a little funny when Attendee Registration shows at the top of the page during checkout instead of something like “Vendor Registration”, and choosing a number of “Tickets” rather than number of “Tables” or “Space” etc. Be nice to be able to set these for specific events in the settings. |
Hi, that can be done by using a translation plugin like Quick Localization or Loco Translate. You could also use a gettext filter: https://eventespresso.com/wiki/how-to-change-wording-with-poedit/#plugins — |
|
|
September 15, 2014 at 12:37 am Thanks, I have been able to change the necessary text by adding the suggested code to my theme’s functions.php file. HOWEVER, I need to have this fire only when it is for a specific event name, eg. “Vendor Registration for the Summit”. Could you suggest some code I can use in functions.php to check the event name or another way change text for a specific event? If this is not possible, perhaps I could send vendors to register on a different hostname eg vendors.mydomain.com which would still point to the same wordpress install but the hostname global could be used to determine which espresso event to change text for. |
|
Hi, You could try an if statement similar to the is_singular (I would say use is_single() ) as described here: http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext#Change_the_Comment_Form HOWEVER, my test site did not like this at all and threw fatal errors, you may get more mileage out of it, but I would suggest testing this on a development server first. |
|
I’ve been able to use $_POST[‘tkt-slctr-event-id’] to determine which event the checkout is for. However, I’m finding this strange behavior… Here’s what should work: $tkt_slctr_event_id=$_POST[‘tkt-slctr-event-id’]; function mycustom_filter_gettext( $translated, $original, $domain ) { $strings = array( if ( isset( $strings[$original] ) ) { $translations = get_translations_for_domain( $domain ); return $translated; add_filter( ‘gettext’, ‘mycustom_filter_gettext’, 10, 3 ); } /* End $tkt_slctr_event_id check */ But it doesn’t. If I purposely set $tkt_slctr_event_id to always be 254 by changing: Then it works, and of course it works no matter what the event ID. Or if instead I add a print “TEST:”.$_POST[‘tkt-slctr-event-id’]; $tkt_slctr_event_id=$_POST[‘tkt-slctr-event-id’]; … } Really weird. I’ve tried changing |
|
Hi, As far as I can tell, $_POST is NULL at that point so that’s probably why it’s not working. In fact I tried a variety of ways to get the event id but none worked. IF you are on the event registration form, you are off the event and instead on a page (EVENT_CHECKOUT). As such I don’t think it’s possible to do what you are trying to do at such a specific level. |
The support post ‘Suggested feature: ability to change the term "Tickets" and "Attendees"’ 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.