• Resolved Sasseke

    (@sasseke)


    Dear madam/sir
    I wish to change the word ‘Product’ in the black column of the standard template (PDF form) to ‘Activiteit’. The black column has the words ‘Product’, ‘Hoeveelheid’ (Amount) and ‘prijs’ (Price).

    Can anyone help me with this?

    I use a child theme.
    Sincerely
    Diana

Viewing 1 replies (of 1 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hello @sasseke

    You should be able to translate that string using a plugin like Loco Translate or using the code snippet below:

    add_filter( 'gettext', 'wcpdf_override_strings', 10, 3 );
    function wcpdf_override_strings( $translation, $text, $domain ) {
    	if( $domain == 'woocommerce-pdf-invoices-packing-slips' ) {
    		$translation = str_ireplace( 'Product', '‘Activiteit', $translation );
    	}
        return $translation;
    }

    If you never worked with actions/filters please read our documentation page: How to use filters

    Hope that helps!

    • This reply was modified 4 years, 2 months ago by alexmigf.
Viewing 1 replies (of 1 total)
  • The topic ‘Change ‘Product’ to ‘Activiteit’ in black column standard template’ is closed to new replies.