Rename the related products heading on single products in WooCommerce

Rename the related products heading on single products in WooCommerce on child sites.

Snippet Type

Execute on Child Sites

Snippet

add_filter( 'woocommerce_product_related_products_heading', 'wc_rename_related_products' );
 
function wc_rename_related_products() {
   return "Customers also viewed";
}