bluvertigo
10/1/2015 - 12:25 PM

Tradurre frasi o parole presenti in woocommerce / translate words from woocommerce (p.e. for translate the SKU)

Tradurre frasi o parole presenti in woocommerce / translate words from woocommerce (p.e. for translate the SKU)

add_filter('gettext', 'translate_text'); 
add_filter('ngettext', 'translate_text');

function translate_text($translated) { 
    $translated = str_ireplace('SKU', 'cod', $translated); 
    $translated = str_ireplace('DESCRIPTION', 'what about it', $translated); 
    return $translated; 
}