Rename of Out of Stock to Sold Out?

Home Forums Ticket Products Event Tickets Plus Rename of Out of Stock to Sold Out?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1161330
    Tac
    Participant

    Hi,

    At this stage, once a ticket is sold out, the message says “Out of Stock”, which we think spreads a wrong message. We would like to rename it to “Sold Out”. How can we make this happen?

    Thanks in advance.

    #1161517
    Geoff
    Member

    Hi Tac and nice to see you again — hope all is well!

    You can actually use the snippet provided in this post to change the wording:

    https://theeventscalendar.com/knowledgebase/change-the-wording-of-any-bit-of-text-or-string/

    So, it will looks something like this:

    function tribe_custom_theme_text ( $translation, $text, $domain ) {
    $custom_text = array(
    'Out of stock!' => 'Sold out',
    );
    
    // If this text domain starts with "tribe-", "the-events-", or "event-" and we have replacement text
    if( (strpos($domain, 'tribe-') === 0 || strpos($domain, 'the-events-') === 0 || strpos($domain, 'event-') === 0) && array_key_exists($translation, $custom_text) ) {
    $translation = $custom_text[$translation];
    }
    return $translation;
    }
    add_filter('gettext', 'tribe_custom_theme_text', 20, 3);

    Will this help you get started? Please let me know. 🙂

    Cheers,
    Geoff

    #1171066
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Rename of Out of Stock to Sold Out?’ is closed to new replies.