“Home” in WooCommerce breadcrumbs translation

Wow, did I spend a lot of time on this one. I am using WordPress WooCommerce and Mystile theme. And guess what, I need to translate the Home in the beginning of the breadcrumbs. I had a string translation in both theme and WooCommerce translations set up, I tried a custom function to replace the word Home on the breadcrumbs, went through the WooCommerce plugin files and thought I had found the right places where the breadcrumb came from, but no, I was never right. I gave up looking and went for a workaround. 

I had Yoast SEO installed, so I replaced the WooCommerce (or was it) breadcrumbs with Yoast SEO. This is how.

1. Go to SEO -> Internal links and enable breadcrumbs

2. In your theme functions.php add this code

// Both woo_breadcrumbs() and Yoast breadcrumbs need to be enabled in the WordPress admin for this to function.

add_filter( ‘woo_breadcrumbs’, ‘woo_custom_use_yoast_breadcrumbs’ );

function woo_custom_use_yoast_breadcrumbs ( $breadcrumbs ) {

if ( function_exists( ‘yoast_breadcrumb’ ) ) {

$before = ‘<div class=”breadcrumb breadcrumbs woo-breadcrumbs”><div class=”breadcrumb-trail”>’;

$after = ‘</div></div>’;

$breadcrumbs = yoast_breadcrumb( $before, $after, false ); 


return $breadcrumbs;

} // End woo_custom_use_yoast_breadcrumbs()


After this style of the breadcrumbs changed but Yoast SEO has translation fields already set up for WPML which I used so worked for me. Hope someone else finds this useful too. 

Post Author: Tom Pai