Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter roabe

    (@roabe)

    Change the button text “Get Tickets”:
    (I solved it myself)

    function tribe_custom_theme_text_with_context ( $translation, $text, $context, $domain ) {
     
    	// Put your custom text here in a key => value pair
    	// Example: 'Text you want to change' => 'This is what it will be changed to'
    	// The text you want to change is the key, and it is case-sensitive
    	// The text you want to change it to is the value
    	// You can freely add or remove key => values, but make sure to separate them with a comma
    	// This example changes the label "Venue" to "Location", and "Related Events" to "Similar Events"
    	$custom_text = array(
    		'Get Tickets' => 'New text',
    	);
    	
    	// 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_with_context', 'tribe_custom_theme_text_with_context', 21, 4);
    Thread Starter roabe

    (@roabe)

    I helped myself… Solved

    Hi there,

    Awesome! Glad you were able to come up with a solution. Thanks for sharing it here for others to see.

    The new tickets UI introduced some new translation strings. These may not all be translated yet for a given language. If you have a custom translation file, it may also need to be updated to include the new strings.

    Best,
    Sky

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Get Tickets button’ is closed to new replies.