Emails, My Account, Thank You Page

WooCommerce Change Product Names After Purchase

WooCommerce product name changing in the emails


There are no pre-requisites in order for you to be able to implement this solution.

How To Implement This Solution?

Simply copy the pre-coded solution to your active theme’s functions.php or preferably the Code Snippets Plugin.

About This Solution

This snippet allows you to change the product name after the purchase has been made. Let’s say for example you are selling adult products or services and the customer doesn’t want these shown on the emails. Well this snippet will replace the product name meaning they see an admin defined string rather than the product name. The new string will be shown on the thank you page, emails, and my account order view. However, the admin will still see the actual product name in the admin dashboard.


 * Snippet Name:	WooCommerce Change Product Name After Purchase
 * Snippet Author:

add_filter( 'woocommerce_order_item_name', 'ecommercehints_change_product_name_after_purchase', 20, 3 );
function ecommercehints_change_product_name_after_purchase( $item_name, $item, $is_visible ) {
	$item_name = 'Full English Breakfast';
	return $item_name;

Snippet Benefits

  • Allow privacy for your customers if they are buying products they don’t want overtly shown in the emails or thank you page.

100 WooCommerce Conversion Rate Optimisation Tips

This field is for validation purposes and should be left unchanged.

Let’s collaborate!

Need to outsource WordPress development?

Join forces with UnlimitedWP for an outsourced white label web development service you can truly rely on.

First Timer Here?

Sign up to receive 20% off on your first month with us.