How To Show Sold Out On Woocommerce

How to Show “Sold Out” on WooCommerce: A Beginner’s Guide

So, your WooCommerce store is booming! That’s fantastic! But what happens when your most popular products sell out? Instead of leaving customers guessing or, worse, accidentally letting them order something you don’t have, you need to clearly display “Sold Out.” This article will walk you through several easy ways to achieve this, ensuring a smooth and informative customer experience.

Why Showing “Sold Out” is Crucial

Think of it this way: imagine walking into your favorite bakery, seeing a delicious cake on display, but when you try to order it, the baker just shrugs and says, “Oh, we’re out.” Frustrating, right?

Displaying “Sold Out” does more than just avoid disappointment. It:

    • Manages Customer Expectations: People instantly know the product isn’t available, preventing frustration and wasted time.
    • Reduces Cart Abandonment: No more adding to cart, only to find out during checkout that the item is unavailable.
    • Improves User Experience: Clear communication leads to a better overall shopping experience, encouraging customers to return.
    • Potentially Drives Future Sales: You can use the “Sold Out” message as an opportunity to suggest similar products or ask customers to sign up for restock notifications.

    Method 1: WooCommerce’s Built-in Inventory Management

    The easiest and most recommended way is to leverage WooCommerce’s built-in inventory management system. This method automatically displays “Sold Out” when your stock reaches zero.

    Here’s how to set it up:

    1. Enable Inventory Management: Go to WooCommerce > Settings > Products > Inventory.

    2. Make sure the “Enable stock management” checkbox is ticked.

    3. Manage Stock at the Product Level: Now, go to the product you want to manage. Under the “Product data” meta box, click on the “Inventory” tab.

    4. Read more about How To Change Images Colors In Woocommerce Set Stock Quantity: Enter the number of units you have in the “Stock quantity” field.

    5. Manage Stock Status: Under “Stock status” you Check out this post: How To Use Woocommerce Advanced Free Shipping Plugin can select the item’s status directly (“In stock,” “Out of stock,” or “On backorder”).

    6. Allow Backorders (Optional): If you allow backorders (meaning customers can order even if you’re out of stock), choose your desired option.

    7. Low Stock Threshold (Optional): Set a “Low stock threshold” to receive notifications when a product is running low.

    Example:

    Let’s say you’re selling handmade candles. You have 10 “Lavender Dream” candles. In the “Inventory” tab, you would:

    • Set “Stock quantity” to 10.
    • Leave “Allow backorders?” set to “Do not allow.”

    As customers buy your candles, the “Stock quantity” will automatically decrease. When it reaches 0, WooCommerce will automatically display “Sold Out” on the product page, and the product will Discover insights on How To Make Woocommerce Pages Full Width become unavailable for purchase.

    Method 2: Manually Setting “Out of Stock”

    Even if you don’t use stock management, you can manually set a product’s status to “Out of stock.”

    1. Go to your product’s edit page.

    2. Under the “Product data” meta box, click on the “Inventory” tab.

    3. In the “Stock status” dropdown, select “Out of stock.”

    4. Update the product.

    This is useful when you know a product won’t be available for a while, even before your inventory runs out completely.

    Method 3: Customizing the “Sold Out” Message (Advanced)

    You might want to change the default “Sold Out” message to something more engaging or informative. You can achieve this using code snippets within your theme’s `functions.php` file or a custom plugin. Warning: Always back up your website before making changes to the `functions.php` file.

     add_filter( 'woocommerce_get_availability', 'custom_woocommerce_get_availability', 1, 2); 

    function custom_woocommerce_get_availability( $availability, $_product ) {

    if ( ! $_product->is_in_stock() ) {

    $availability[‘availability’] = __(‘Currently unavailable! Check back soon!’, ‘woocommerce’);

    }

    return $availability;

    }

    Explanation:

    • `add_filter( ‘woocommerce_get_availability’, ‘custom_woocommerce_get_availability’, 1, 2);` This line hooks into WooCommerce’s `woocommerce_get_availability` filter.
    • `custom_woocommerce_get_availability( $availability, $_product )` This is the function that modifies the availability message.
    • `if ( ! $_product->is_in_stock() )` This condition checks if the product is out of stock.
    • `$availability[‘availability’] = __(‘Currently unavailable! Check back soon!’, ‘woocommerce’);` This line changes the availability message to “Currently unavailable! Check back soon!” You can replace this with your desired message.

    How to Use:

    1. Access your `functions.php` file: Navigate to Appearance > Theme Editor (or Theme File Editor in some themes). Locate the `functions.php` Explore this article on Woocommerce How To Get Product Stock file.

    2. Add the code: Carefully paste the code snippet at the *end* of the `functions.php` file.

    3. Update the file: Click the “Update File” button.

    4. Test: Visit a sold-out product page to see if the message has changed.

    Important: Always back up your website before modifying the `functions.php` file. If you’re uncomfortable with coding, consider using a plugin designed for WooCommerce customizations.

    Method 4: Using a WooCommerce Plugin

    Several plugins offer more advanced control over how “Sold Out” is displayed and handled. These plugins often include features like:

    • Restock notification forms: Allowing customers to sign up for email alerts when a product is back in stock.
    • Redirecting sold-out products: Sending visitors to a similar product page.
    • Custom “Sold Out” badges and overlays: Visually highlighting sold-out items.

Search the WordPress plugin repository for terms like “WooCommerce Sold Out,” “WooCommerce Restock Notification,” or “WooCommerce Out of Stock.” Popular options often include “WooCommerce Waitlist” and variations of “Product Stock Manager.” Remember to read reviews and check compatibility before installing any plugin.

Conclusion

Clearly displaying “Sold Out” on your WooCommerce store is essential for managing customer expectations and improving the overall shopping experience. Whether you choose to use WooCommerce’s built-in features, customize the message with code, or leverage a plugin, remember to prioritize clear communication and a seamless user experience. A happy customer, even one who couldn’t buy something today, is more likely to return in the future!

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

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