Problem Description:

“I want the out of stock tag on my products to say SOLD instead – how do I change it?”

 

Answer:

The most fool-proof and easy-to-manage way to change any text in WooCommerce is to use a plugin such as Poor Guys Swiss Knife for WooCommerce, or WooCommerce Tabs. You may also do it with any translation plugin.

If you are a developer or are comfortable with modifications, you can try adding a custom functions file to the theme with the following code. Note that this code is valid as of WooCommerce 2.1,  and is not tested or directly supported by Obox. For extended help with WooCommerce modifications, please visit the WooCommerce homepage.

This is considered a modification, and is provided as-is. We expect you understand what you are doing if applying coding changes using these or other WordPress tutorials. Make a backup of your existing file so you can replace it if something goes wrong and you need to start over. Modified files WILL probably be replaced by a theme update at some point, so keep note of your changes for future reference or see our guides below. We cannot assist you with modifying your theme or support problems you encounter as a result!

If you are modifying a theme as part of a client project, the following are really important!

How to Modify Your Theme the Right Way
How to Track Update Changes and Maintain Modifications
add_filter('woocommerce_get_availability', 'availability_filter_func');
function availability_filter_func($availability)
{
$availability['availability'] = str_ireplace('Out of stock', 'Sold', $availability['availability']);return $availability;
}