How to Change “Related Products” Text in WooCommerce
Woocommerce single product page displays the text “Related Products” after the product description and sometimes you would like to change that according to yur taste
It’s easy to do without using any plugins and clutter your website, do it clean this way
// 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__('Check out our other products', $domain);
}
return $translated;
}