Support

Home Forums Event Espresso Premium Changing Closed Status to Sold out

Changing Closed Status to Sold out

Posted: December 16, 2020 at 11:26 am

Viewing 5 reply threads


kevin l

December 16, 2020 at 11:26 am

We are trying to change the CLOSED status on the front of the calendar to say “Sold Out”.

http://prntscr.com/w45npk

Looking at a past post on the board, we tried this but it hasnt worked in our function file. What are we missing?

function mycustom_filter_gettext( $translated, $original, $domain ) {

// This is an array of original strings
// and what they should be replaced with
$strings = array(
'CLOSED' => 'SOLD OUT',
'Closed' => 'Sold Out',
// 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] );
}

return $translated;
}

add_filter( 'gettext', 'mycustom_filter_gettext', 10, 3 );


Tony

  • Support Staff

December 17, 2020 at 4:56 am

Hi there,

Just to confirm we are on the same section here, do you mean the ‘Registration Closed’ string?

Can you add a screenshot (or a link to a page I can view it on) of what you are looking to change?

https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots


kevin l

December 17, 2020 at 6:32 am

This reply has been marked as private.


Tony

  • Support Staff

December 17, 2020 at 7:27 am

Hi there,

That section is the event title and Event Espresso 3 (or 4 for that matter) does not add ‘(CLOSED)’, ‘(FULL)’ etc to the end of the event titles so this likes its either something custom, or its been manually set on the event title itself?

For example, if you edit the event that shows on November 29th, does it show ‘(CLOSED)’ in event title?

Is it yourself that changes those titles? I ask just to check that those aren’t being manually added when the event is updated etc?


kevin l

December 17, 2020 at 7:38 am

Yep, you’re absolutely correct. I had the wrong info on the issue from my dev. So the client was actually wanting to get it to auto add “Sold” to the title similar to how we have “closed” in it now when an event sells all of its seats. Is that possible?

Thank you!


Tony

  • Support Staff

December 17, 2020 at 9:57 am

No currently, no.

The tooltips for the calendar shows ‘Registration Closed’ or ‘Sold out’ for events like these so can they not use the tooltips?

To view those go to Event Espresso -> Calendar Settings

Set ‘Show Tooltips’ to true.

Depending on the events status and if it is shold out or not the button shown on the tooltip will change to show the relevant string.

Will that work?

Viewing 5 reply threads

The support post ‘Changing Closed Status to Sold out’ 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