Add “Products” to breadcrumb on woocommerce category pages

// add "Products" to breadcrumb on category pages and other missing levels
add_filter( 'wpseo_breadcrumb_links', 'wpseo_breadcrumb_add_woo_shop_link' );
function wpseo_breadcrumb_add_woo_shop_link( $links ) {
global $post;
if ( is_woocommerce()
&& !is_shop() // not top level shop page
&& !is_product() // not on single product page
) {
$breadcrumb[] = array(
'url' => get_permalink( woocommerce_get_page_id( 'shop' ) ),
'text' => 'Products',
);
array_splice( $links, 1, -2, $breadcrumb );
} elseif ( is_post_type_archive( 'news' ) || is_singular( 'news' ) ) {
$breadcrumb[] = array(
'url' => get_permalink( '29' ),
'text' => 'Information',
);
$breadcrumb[] = array(
'url' => get_permalink( '50' ),
'text' => 'Media',
);
array_splice( $links, 1, -2, $breadcrumb );
} elseif ( is_home() ) { // any other archive...
$breadcrumb[] = array(
'url' => get_permalink( '29' ),
'text' => 'Information',
);
$breadcrumb[] = array(
'url' => get_permalink( '50' ),
'text' => 'Media',
);
array_splice( $links, 1, -2, $breadcrumb );

} elseif ( is_singular( 'post' ) ) {
$breadcrumb[] = array(
'url' => get_permalink( '29' ),
'text' => 'Information',
);
$breadcrumb[] = array(
'url' => get_permalink( '50' ),
'text' => 'Media',
);
$breadcrumb[] = array(
'url' => get_permalink( '54' ),
'text' => 'Blog',
);
array_splice( $links, 1, -2, $breadcrumb );
}
return $links;
}