[Resolved] GP and WooCommerce: change related product text

Home Forums Support GP and WooCommerce: change related product text

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #983073
    Samuel

    I use GP and WooCommerce in German. What is the most effective way to change the text “Ă„hnliche Produkte” to something like “EXAMPLE” with GP? Preferably via function.php

    Screeenshot: http://prntscr.com/os5lgj

    #983213
    David
    Staff
    Customer Support

    Hi there,

    this is the filter i would use to translate the text:

    add_filter( 'gettext', function( $translated_text ) {
        if ( 'Related products' === $translated_text ) {
            $translated_text = 'Your new text here';
        }
    
        return $translated_text;
    } );

    Just need to change the text you’re looking for and add the translated text you want.

    #983770
    Samuel

    Amazing thx!

    #983794
    David
    Staff
    Customer Support

    You’re welcome – its a real handy filter in WP for dealing with those elements that don’t have their own filter.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.