# How to Change “Out of Stock” Text in WooCommerce: A Beginner’s Guide
Selling products online with WooCommerce is exciting, but managing inventory can be tricky. One common issue is the default “Out of Stock” text. It might not fit your brand’s voice or be clear enough for your customers. This guide shows you how to easily change that text, making your store more professional and user-friendly.
Why Change the Default “Out of Stock” Text?
The default WooCommerce “Out of Stock” message is functional, but it lacks personality. Consider these reasons for customizing it:
- Brand Consistency: A consistent brand voice is crucial. The “Out of Stock” message should align with your overall tone. A playful brand might use something like “Sold Out!”, while a luxury brand might opt for “Currently Unavailable.”
- Improved Customer Experience: A clear and informative message reduces customer frustration. Instead of simply stating “Out of Stock,” you can provide helpful alternatives like: “Expected back in stock on [Date]” or “Sign up for email notifications.”
- Increased Conversions: By offering alternative options or encouraging engagement, you can turn a potentially negative experience into an opportunity to retain customers.
Methods to Change the “Out of Stock” Text
There are several ways to modify the WooCommerce “Out of Stock” text, ranging from simple to more advanced techniques:
Method 1: Using the WooCommerce Product Data Screen (Easiest Method)
This method lets you change the text on a per-product basis. This is ideal if you want specific messages for individual items.
1. Log in to your WordPress dashboard.
2. Navigate to Products > All products.
3. Edit the product you want to change.
4. Scroll down to the Inventory section.
5. In the Out of stock text field, enter your desired message.
6. Update the product.
Example: Instead of “Out of Stock,” you might write “Temporarily Unavailable – Back Soon!”
Method 2: Using WooCommerce’s “Customizer” (For Global Changes)
This approach allows for site-wide changes to the out-of-stock text. It’s the easiest way to implement consistent changes across your store.
1. Go to Appearance > Customize in your WordPress dashboard.
2. Look for the WooCommerce section. The exact location might vary depending on your theme.
3. Find the Product Settings or a similar option within WooCommerce settings.
4. You’ll likely find an option to change the “Out of stock” text. Enter your preferred message.
5. Publish your changes.
Method 3: Using a Child Theme and Code (Most Advanced Method, Recommended for experienced users)
This method offers the most control but requires some coding knowledge and using a child theme to avoid losing your changes during updates.
Why a child theme? Modifying your theme’s core files directly can cause issues when updating WooCommerce or your theme. A child theme keeps your customizations separate and safe.
This code snippet will change the “Out of stock” text globally. Add this to your child theme’s `functions.php` file:
add_filter( 'woocommerce_get_availability', 'custom_woocommerce_get_availability', 10, 2 );
function custom_woocommerce_get_availability( $availability, $product ) {
if ( ! $product->is_in_stock() ) {
$availability[‘availability’] = __( ‘Sold Out!’, ‘your-text-domain’ ); //Replace ‘Sold Out!’ with your desired text
}
return $availability;
}
Remember to replace `’Sold Out!’` with your desired text and `’your-text-domain’` with your theme’s text domain (you can usually find this in your theme’s `functions.php` file).
Choosing the Right Method
- For single product adjustments, use Method 1.
- For global changes across your store and without coding, Method 2 is best.
- For advanced customization and precise control, use Method 3 (but only if you’re comfortable with code).
By implementing these simple changes, you can greatly enhance the user experience on your WooCommerce store and maintain a consistent brand voice, even when items are temporarily out of stock. Remember to always back up your website before making any code changes!