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:	ecommercehints.com

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.
WooCommerce Conversion Rate Optimisation (CRO) eBook
100 WooCommerce Conversion Rate Optimisation Tips

Leave a Reply

If you are going to write code in the comments, please wrap it between code tags.

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

Other Recent Guides

Subscribe To Emails

Get exclusive WooCommerce tips that I only share with email subscribers

Join hundreds of other subscribers