Strtip producttitle after certain number of characters.
add_filter('the_title', 'sitiweb_shorten_woo_product_title', 10, 2);
function sitiweb_shorten_woo_product_title($title, $id)
{
$link = get_the_permalink($id);
$stip_after = 45; // strip after 45 characters.
if (is_shop() && get_post_type($id) === 'product') {
if (strlen($title) > $stip_after) {
return '<a href="' . $link . '" class="link-custom-product">' . substr($title, 0, $stip_after) . ' …</a>'; // change last number to the number of characters you want
}
return '<a href="' . $link . '" class="link-custom-product">' . $title . '</a>';
}
return $title;
}