Translate Woocommerce Breadcrumb Home

Add this snippet to your functions.php inside your theme folder. It will then translate Home to Swedish ‘Hem’.

add_filter( 'woocommerce_breadcrumb_defaults', 'jk_change_breadcrumb_home_text' );
function jk_change_breadcrumb_home_text( $defaults ) {
    // Change the breadcrumb home text from 'Home' to 'Hem'
	$defaults['home'] = 'Hem';
	return $defaults;
}

For more information see: https://docs.woothemes.com/document/customise-the-woocommerce-breadcrumb/

Add your comment