Skip to main content
Login Join
Snippet · PHP

Change WooCommerce “You May Also Like” Text on Cart

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

6 views
Back to Snippets

If you want to customize the cross-sell section heading on the WooCommerce Cart page, you can change it with a simple filter.

Steps

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

Done — the default cross-sell heading will be replaced with your custom text.

function change_cart_cross_sell_heading( $heading ) {
    return 'Recommended For You';
}

add_filter(
    'woocommerce_product_cross_sells_products_heading',
    'change_cart_cross_sell_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