Sold Out Badge
(BU)Sold Out Badge displays a label when WooCommerce reports that the current product is not in stock. Use it on product cards or detail pages to set expectations before a shopper tries to buy. The badge does not manage inventory, disable purchase controls, or collect restock requests.
Set Up the Badge
- In Bricks → BricksUltimate → Woo Elements, enable Sold Out Badge and save.
- Choose a test product that WooCommerce reports as Out of stock. Check its Inventory settings or, for a variable product, its variation stock settings.
- Open a single-product template or product grid in Bricks and add (BU)Sold Out Badge. Put it beside the title or inside the image wrapper. In a grid, place it inside the repeated product card.
- Leave Product ID blank in a single-product template or loop. Set the Badge label, then verify that the label appears on the sold-out product and stays hidden on an in-stock product.
For a regular page without an active product context, enter the numeric Product ID of the item you want to check. This is a fallback; an existing WooCommerce product in the current context takes precedence.
Understand Stock Status
- Out of stock: The badge appears when the product fails WooCommerce's in-stock check. It does not use a separate quantity threshold.
- In stock or on backorder: WooCommerce normally treats both as in stock for this check. An item that can be backordered does not show the standard Sold Out badge merely because its available quantity reached zero.
- Variable products: A card or product page whose context is the variable parent checks the parent's stock status. One sold-out size does not make an otherwise available parent product sold out. An individual variation in a variation loop is checked as that variation. The standalone badge does not switch when customers choose a size or color on a parent product page.
- Hidden out-of-stock items: If WooCommerce or your product query removes sold-out products from the grid, the badge has no card to render on. Review inventory visibility if you want shoppers to see those items.
To let shoppers request a restock email, pair the label with Back In Stock. The notifier can follow the selected variation on a variable product page; the standalone badge cannot.
Style the Badge
- Badge: Enter a short label such as Sold Out or Out of Stock. This field uses plain label text rather than a Bricks dynamic-data tag.
- Tag and Display: Use a
spanwith an inline display beside the title, or use a standalone badge. For a compact label, choose inline-block, leave width and height unset, and add padding. - Size & Spacing: Adjust width, height, margin, padding, background color, and typography. When using flex, use the main- and cross-axis alignment controls.
- Image overlay: Set the image wrapper to Relative, set the badge to Absolute, and choose top and side offsets. Check that the label remains legible and does not cover other controls.
- Hide In-Builder Editor? Hides the demo badge inside Bricks only. The storefront still follows the product's stock status.
Troubleshooting
- Visible in the editor, missing on the storefront: The editor shows a styling preview. Check that the actual product is out of stock and not available for backorder.
- It does not show for one sold-out variation: Check whether the element is evaluating the parent product. Use the variation's availability display or the Back In Stock notifier for selection-specific feedback.
- It remains after a restock: Check the saved stock status of the product and its variations, then clear any cached pages or product grids.
- It appears on the wrong card: Put the element inside the product loop item, leave Product ID blank, and verify the product query context.
Related: Sales Badge for price savings and New Badge for recent or manually flagged products.