I’ve limited the number of tickets available to individuals, but want to have an option for people to register larger groups by request. I added the following into an Espresso Customisation plugin on our site:
$strings = array(
‘Available Tickets’ => ‘Event Registration’,
‘Please note that a maximum number of %d tickets can be purchased for this event per order.’ => ‘*Please note that a maximum number of 4 tickets can be purchased for this event per order. To register a group larger than 4, please email a request to myemail.’,
// Add some more strings here
);
// See if the current string is in the $strings array
// If so, replace its translation
if ( isset( $strings[$original] ) ) {
// This accomplishes the same thing as __()
// but without running it through the filter again
$translations = get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
The original string must match, so the original here needs to be:
‘Please note that a maximum number of %1$d tickets can be purchased for this event per order.’
Try
'Please note that a maximum number of %1$d tickets can be purchased for this event per order.' => '*Please note that a maximum number of 4 tickets can be purchased for this event per order. To register a group larger than 4, please email a request to myemail.',
The support post ‘Change message about maximum number of tickets that can be purchased’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.