// Change WooCommerce “Related products” text
add_filter(‘gettext’, ‘change_rp_text’, 10, 3);
add_filter(‘ngettext’, ‘change_rp_text’, 10, 3);
function change_rp_text($translated, $text, $domain)
{
if ($text === ‘Related products’ && $domain === ‘woocommerce’) {
$translated = esc_html__(‘You may also like’, $domain);
}
return $translated;
}
/* Force 4 line title inclusve on Product Archive to align the ‘Add to Cart’ buttons on the bottom */
.woocommerce ul.products li.product h2 {
line-height: 2.5ex;
height: 10ex; }/* 2.5ex for each visible line */