This post was last updated on November 4th, 2017!

Using WooCommerce’s Up-Sells feature is a good and profitable idea because you can recommend other products instead of the currently viewed one. It’s similar to using Related Posts at the bottom of your blog post.

In this way, you can bring to your customer’s attention to other products that are more profitable, have a better quality, or are more expensive; it’s up to you.

The bad news is that this feature comes with the default text “You may also like…”, which will be positioned above the recommended products.

Some of you may be bothered by this, as we were, because that text might not be such a good fit for your products or services. Therefore, you’ll want to change it, and I’ll tell you how!

You might also want to learn:

How to change the WooCommerce Up-Sells text

I’ll point out five different ways to do this. If you know other techniques, please share it with us by dropping a comment.

Also, you might want to read this guide to find out how to access your WordPress website’s files.

The first two methods are not ideal, because the changes will be reversed with every update!

Method 1 – Changing the text in the up-sells.php file

1. Ok, what you need to do is to log into your hosting’s control panel (cPanel in this case) and find File Manager:

cpanel file manager

2. Now, under public_html, go to /wp-content/plugins/woocommerce/templates/single-product/up-sells.php:

up sells php file in woocommerce

3. Right-click on the upsells.php file and choose Edit or Code Edit to find the line quick.

4. After that, scroll down to line 39 (it may be a different line for you) and change the “You may also like” text to whatever you want.

change "you may also like..." woocommerce up-sells text

5. Click Save Changes and you’re done!

Method 2 – Changing the text in the woocommerce.pot file

That file might seems strange because of that .pot extension, but don’t worry, the editing process is the same.

1. Just like above, log into cPanel, go to File Manager, and under public_html go to /wp-content/plugins/woocommerce/i18n/languages/woocommerce.pot

woocommerce-pot-file

2. Now right-click it and select Edit or Code Edit. Since this is a large file, it will be easier to just press Ctrl+F (Command + F on Mac) on your keyboard, then enter “you may also like” in the search box, and click find.

change woocommerce "you may also like..." up-sells text

3. Change the text to whatever you like and click Save Changes.

The following three methods are ideal, because the changes won’t be reversed with every update, but they are a bit more advanced, and might also not work for everybody!

Method 3 – Copying and editing the up-sells.php file in your child theme

Create these folders in your child theme: /woocommerce/templates/single-product/ and add / paste the up-sells.php in the last folder, which is /single-product/. Then make the changes there.

So, eventually, the file should be found and edited here: /public_html/wp-content/themes/YourThemeName-child/woocommerce/templates/single-product/up-sells.php.

Note that this might not work on all themes!

Method 4 – Performing a function override in your child theme

Perform a function override and add it in your child theme’s functions.php, but the same function probably won’t work for everyone, and even if it does, at some point it may stop working due to changes in the future WooCommerce updates, so you’ll have to make changes to your function as well.

Therefore, if you’re not a developer, you’ll need to constantly seek help.

Christina recommended, in the comment section, to use the code found here:

<?php
/**
* Change text strings
*
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
function my_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Related Products' :
$translated_text = __( 'Check out these related products', 'woocommerce' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'my_text_strings', 20, 3 );

This was recommended in 2013, and I don’t know for how many people it will still work now. One user said:

This was a great help to me last year and I changed a couple of strings really easily for me and my site. But yesterday I updated the site to WordPress 4.0 & WooCommerce 2.2.4 and now the strings are not working – the labels I previously had changed are back to normal!

Which proves what I said above – a function override might stop working at some point due to some string changes in the plugin’s future updates.

You could still try the code, if you wish, to see if it works, but make sure you back up your child theme’s functions.php file or perform a full website backup.

I couldn’t find a recent code, so if you wish to use this method, it would be best to ask your theme developers or seek help on the WooCommerce forum. If you are a Woo customer, then, of course, you can benefit from their premium support.

Method 5 – Using a translation plugin

You could also use a plugin, like Loco Translate, as Vladislav pointed out in the comment section.

But I really don’t recommend using a plugin (the fewer plugins, the better) just for changing 4 words, unless your site is already in another language, and adding a translation plugin would be of help anyway.

You might also want to learn:

That’s a wrap

Hope you found our guide useful! If you know another technique, please share it with us by leaving a comment!

Don’t forget to share the post with your friends!

WP Rocket - WordPress Caching Plugin