WooCommerce – Change “Related Products” text

This snippet allows to quickly change the “Related products” text which is shown by default at the bottom of a single product page in a WooCommerce shop.

Check out on my test environment: https://shop.nicolasrabier.com/product/woo-album-4/

Insert the code in functions.php of your child theme.

* Change text strings
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext

function custom_related_products_text( $translated_text, $text, $domain ) {
  switch ( $translated_text ) {
    case 'Related products' :
      $translated_text = __( 'Other items you might like', 'woocommerce' );
  return $translated_text;
add_filter( 'gettext', 'custom_related_products_text', 20, 3 );



  1. Could we change the text based on the product category?
    I have implemented a hook for that on archive pages and products loop, but couldn’t manage to do it with related products


Leave a Reply

Your email address will not be published. Required fields are marked *