El código que debes poner es este:
/**
* Productos en tienda y categorías
*/
if ( ! function_exists( 'woocommerce_template_loop_product_title' ) ) {
function woocommerce_template_loop_product_title() {
echo '<h3 class="woocommerce-loop-product__title">' . get_the_title() . '</h3>';
}
}
/**
* Productos relacionados
*/
add_filter('woocommerce_product_related_products_heading', function(){return false;});
function woocommerce_product_loop_start( $echo = true ) {
ob_start();
wc_set_loop_prop( 'loop', 0 );
wc_get_template( 'loop/loop-start.php' );
$loop_start = apply_filters( 'woocommerce_product_loop_start', ob_get_clean() );
if ( $echo ) {
// check to see if it's the related loop
if (wc_get_loop_prop('name') == 'related'){
// Change the heading to whatever you want
echo "<h3>Productos relacionados</h3>";
}
echo $loop_start; // WPCS: XSS ok.
} else {
return $loop_start;
}
}
En mi caso no me funciona si lo uso en Code Snippets y lo tengo que poner obligatoriamente en el functions.php