xpay✦ Commerce
Directory
WooCommerce plugins
Sold Out Badge for WooCommerce
Sold Out Badge for WooCommerce
Display a "Sold Out!" badge on out-of-stock products. Show the text and colors you want. Perfect for artists, artisans, real estate professionals...
4.8
(25 ratings)Will this break my store?
What the WordPress.org registry says about keeping Sold Out Badge for WooCommerce running.
Tested to 6.2.9 — 8 branches behind 7.0
Several branches behind. Worth checking on a staging site before updating WordPress.3 years ago
At least 4.7 releases a year since launch. WordPress.org only lists versions still available for download, so the real number may be higher.7.2
Your host must be running at least this version.5.2
1
A single maintainer. Worth knowing if the plugin is load-bearing for your store.Maintenance & trust
Scored on how Sold Out Badge for WooCommerce is looked after — not on how many stores run it.
25
out of 100Maintenance
0 / 35WordPress compatibility
0 / 20Support responsiveness
Not enough dataMerchant satisfaction
13 / 15Listing transparency
7 / 10Ratings
4.8
25 ratingsDisplay a “Sold Out!” badge on out-of-stock products.
When a WooCommerce product becomes out of stock, this plugin will show a badge on thumbnail with the text you will have defined.
This plugin was initially created to help people and companies selling unique products or services, like artists, artisans, real estate professionals, etc. It is often beneficial for them to keep showing sold out (out of stock) products on their websites, while displaying a message indicating that the product can’t be sold anymore.
However, this plugin can be used by anyone wanting to display any text in a badge when a product is out of stock.
It is also possible to display a badge on backorder products.
Usage & Documentation
You can customize options in Settings > Sold Out Badge for WooCommerce
What can I customize in this plugin ?
- Badge text (you can replace “Sold Out” with any text you want, like “Out of stock” or “Coming Soon“)
- Badge background color
- Badge text color
- Badge font size
- Badge width
- Badge height
- …
- An option to hide “Sale” badge if you get an overlap (checked by default)
Resources
Yes.
Sure, go ahead! It is completely open source.
Yes. Go to Settings > Sold Out Badge for WooCommerce, you’ll find the setting you want.
You could uninstall this plugin and try to get the badge manually. There are two ways you could do it:
1. Pure CSS
If you’re lucky enough, you’ll have a specific CSS class for out-of-stock products.
You could add a SOLD OUT badge like this:
.product.outofstock:before {
content: 'SOLD OUT';
color: #ffffff;
background: #FE2121;
font-size: 16px;
padding: 4px;
font-weight: bold;
width: auto;
height: auto;
border-radius: 0;
z-index: 9999;
text-align: center;
position: absolute;
top: 6px;
right: auto;
bottom: auto;
left: 6px;
}
2. PHP + CSS
Otherwise, you could use WP hooks to add a badge. Put this code in your child theme’s functions.php:
add_action( 'woocommerce_before_shop_loop_item_title', 'my_custom_soldout_badge_display', 10 );
add_action( 'woocommerce_before_single_product_summary', 'my_custom_soldout_badge_display', 30 );
function my_custom_soldout_badge_display() {
global $post, $product;
if ( ! $product->is_in_stock() ) {
echo '<span class="wcsob_soldout">SOLD OUT</span>';
}
}
Use the following CSS code to style the badge:
.wcsob_soldout {
content: 'SOLD OUT';
color: #ffffff;
background: #FE2121;
font-size: 16px;
padding: 4px;
font-weight: bold;
width: auto;
height: auto;
border-radius: 0;
z-index: 9999;
text-align: center;
position: absolute;
top: 6px;
right: auto;
bottom: auto;
left: 6px;
}
Categories
Plugin details
Tags on WordPress.org
