Title not shortened in featured products

On the featured products – for example on product page below product details
https://prnt.sc/p8n4n9

https://petbox.pl/sklep/calista-adult-cat/

titles are not shortened on shop categories and subcategories. Can You help me with that? I shortened titles with code in functions.php

I want to shortened title in featured products

add_filter( ‘the_title’, ‘shorten_woo_product_title’, 10, 2 );
function shorten_woo_product_title( $title, $id ) {
if ( is_shop() && get_post_type( $id ) === ‘product’ ) {
return wp_trim_words( $title, 4 ); // change last number to the number of WORDS you want
}

else {
return wp_trim_words( $title);
}
}

add_filter( ‘the_title’, ‘shorten_woo_product_title_product_cat’, 10, 2 );
function shorten_woo_product_title_product_cat( $title, $id ) {
if ( is_product_category() ) {
return wp_trim_words( $title, 4 ); // change last number to the number of WORDS you want
}
return $title;
}