Customize the Related Products text on WooCommerce single product page
//* Change Related Products text
function kr_starter_related_products_text( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Related products' :
$translated_text = __( 'You May Also Like', 'woocommerce' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'kr_starter_related_products_text', 20, 3 );