The WPFolks app is out on iPhone and Android. Free, no ads. Download on the App Store Get it on Google Play
Skip to main content
Login Join
Snippet · PHP

Change WooCommerce Related Products Heading

Shared by Amit Dholiya · August 18, 2026 · @woocommerce_product_related_products_heading

38 views
1 upvote
Back to Snippets

WooCommerce displays “Related products” below the product details. You can easily replace this heading with your own text using a simple filter.

Steps

  1. Open your theme’s functions.php file.
  2. Add the code below.
  3. Save the file.
  4. Open a WooCommerce product page.

Done — the Related Products heading will be replaced with your custom text.

function change_related_products_heading( $heading ) {
    return 'You May Also Like';
}

add_filter(
    'woocommerce_product_related_products_heading',
    'change_related_products_heading'
);
Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

0 comments