Your filter woocommerce_breadcrumb doesn't exist.
THere the filters works and calls out all the elements, that are presently in the breadcrumb (as an array):
add_filter( 'woocommerce_get_breadcrumb', 'change_breadcrumb' );
function change_breadcrumb( $crumbs ) {
var_dump( $crumbs );
``` return $crumbs;
}
To call out the main term this the filter (as an object).
add_filter( 'woocommerce_breadcrumb_main_term', 'change_breadcrumb' );
function change_breadcrumb( $main_term ) {
var_dump( $main_term );
return $main_term;
}
First element is the main term which is returned by this function (reference):
`$terms = wc_get_product_terms( $post->ID, 'product_cat', array( 'orderby' => 'parent', 'order' => 'DESC' ) )
`