Title: LONDOM &#8211; Out of Stock Alternatives
Author: Domenico Longo
Published: <strong>February 28, 2026</strong>
Last modified: September 29, 2026

---

Search plugins

![](https://ps.w.org/londom-out-of-stock-alternatives/assets/icon-256x256.png?rev
=3471584)

# LONDOM – Out of Stock Alternatives

 By [Domenico Longo](https://profiles.wordpress.org/londom/)

[Download](https://downloads.wordpress.org/plugin/londom-out-of-stock-alternatives.1.4.0.zip)

 * [Details](https://en-ca.wordpress.org/plugins/londom-out-of-stock-alternatives/#description)
 * [Reviews](https://en-ca.wordpress.org/plugins/londom-out-of-stock-alternatives/#reviews)
 *  [Installation](https://en-ca.wordpress.org/plugins/londom-out-of-stock-alternatives/#installation)
 * [Development](https://en-ca.wordpress.org/plugins/londom-out-of-stock-alternatives/#developers)

 [Support](https://wordpress.org/support/plugin/londom-out-of-stock-alternatives/)

## Description

**Keep customers shopping when a WooCommerce product is out of stock.**
 When a 
customer lands on an out-of-stock product page, LONDOM – Out of Stock Alternatives
shows a box of available alternatives at the top of the page, above the product,
so they can pick another product instead of leaving.

The box lists up to 4 products (filterable):

 1. **Your upsells first** – the upsell products you set in the product’s Linked Products
    tab, if they are in stock.
 2. **Then products from the most specific category** – if there is room left, in-stock
    products from the most specific category assigned to the product, ordered by sales.
    A broad parent category (for example “Men”) is ignored when the product is also
    in a narrower one (for example “Wallets”), so suggestions stay relevant.

If nothing is available, the box says so instead of showing unrelated products. 
A “View all” button leads to the product’s main category (the primary category set
in Yoast SEO or Rank Math, when present).

#### Key Features

 * **Alternatives above the product** – Shown at the top of the product page, after
   the WooCommerce notices, not inside the product layout
 * **Upsells first, then category** – Manual upsells take priority; category products
   fill the remaining slots
 * **Simple and variable products** – A variable product is treated as out of stock
   only when all its variations are unavailable
 * **Add to Cart hidden while unavailable** – The Add to Cart form is removed on
   out-of-stock products (filterable), on themes that use the standard WooCommerce
   hooks
 * **Works with your theme** – Uses standard WooCommerce hooks; tested with Blocksy
   and Storefront. Where the box is printed can be changed with filters
 * **Performance optimized** – Alternative product IDs are cached and checked on
   every page load
 * **Multilingual ready** – Translatable on translate.wordpress.org; compatible 
   with Polylang and WPML
 * **Cache plugin support** – Works with WP Rocket, W3TC, LiteSpeed, and WP Fastest
   Cache
 * **Accessible** – ARIA labels on the links and the alternatives block

#### How It Works

 1. **Detection** – The plugin detects that a simple product, or every variation of
    a variable product, is out of stock
 2. **Notice and alternatives** – A short notice and the alternatives box are printed
    above the product
 3. **Selection** – Up to 4 in-stock products: upsells first, then the most specific
    category
 4. **Caching** – Alternative IDs are cached and re-validated on each page load, so
    sold-out products are filtered out when the page is generated

#### Perfect For

 * WooCommerce stores with frequent stock changes
 * Fashion and apparel shops with seasonal inventory
 * Electronics stores with limited stock items
 * Any e-commerce site that wants to reduce lost sales from stockouts

#### Developer Friendly

Multiple filters and actions available for customization:

 * `londom_alternatives_count` – Change number of alternatives shown
 * `londom_alternatives_title` – Customize the heading text
 * `londom_alternative_products_query_args` – Modify the query for finding alternatives
 * `londom_should_replace_add_to_cart` – Control when replacement happens
 * `londom_oos_display_hook` – Change the hook where the block is printed
 * `londom_oos_display_priority` – Change the priority on that hook
 * `londom_use_context_aware_cache` – Enable context-aware caching
 * And many more…

#### Requirements

 * WordPress 6.0 or higher
 * WooCommerce 6.0 or higher
 * PHP 8.0 or higher

#### Support

For support, please use the [WordPress.org support forum](https://wordpress.org/support/plugin/londom-out-of-stock-alternatives/).

### Additional Information

#### About LondomLab

LondomLab creates practical WooCommerce tools that help online stores increase sales
and improve customer experience. Visit [londomlab.com](https://londomlab.com) for
more plugins and solutions.

#### Privacy & Data

This plugin does not:
 * Collect any user data * Use cookies or tracking * Send 
data to external servers * Store personal information

All data processing happens locally on your WordPress installation.

#### Contributing

Found a bug or have a feature request? Please report it on the [support forum](https://wordpress.org/support/plugin/londom-out-of-stock-alternatives/).

#### Credits

Developed with ❤️ by the LondomLab team.

## Screenshots

[⌊Alternatives block shown at the top of an out-of-stock product page⌉⌊Alternatives
block shown at the top of an out-of-stock product page⌉[

Alternatives block shown at the top of an out-of-stock product page

[⌊Mobile view with responsive grid layout⌉⌊Mobile view with responsive grid layout⌉[

Mobile view with responsive grid layout

[⌊Alternative products with prices and images⌉⌊Alternative products with prices 
and images⌉[

Alternative products with prices and images

## Installation

#### Automatic Installation

 1. Log into your WordPress admin panel
 2. Navigate to Plugins  Add New
 3. Search for “LONDOM Out of Stock Alternatives”
 4. Click “Install Now” and then “Activate”

#### Manual Installation

 1. Download the plugin ZIP file
 2. Log into your WordPress admin panel
 3. Navigate to Plugins  Add New  Upload Plugin
 4. Choose the ZIP file and click “Install Now”
 5. Activate the plugin

#### After Activation

The plugin works automatically! Visit any out-of-stock product page to see the alternatives
block in action.

**Optional Configuration:**

You can customize behavior using WordPress filters in your theme’s `functions.php`:

    ```
    // Change number of alternatives shown (default: 4)
    add_filter( 'londom_alternatives_count', function() { 
        return 6; 
    });

    // Customize the heading text
    add_filter( 'londom_alternatives_title', function() { 
        return 'You might also like these'; 
    });

    // Enable context-aware caching (for multilingual/multi-currency sites)
    add_filter( 'londom_use_context_aware_cache', '__return_true' );

    // Change where the block is printed (defaults: woocommerce_before_single_product, priority 20)
    add_filter( 'londom_oos_display_hook', function() {
        return 'woocommerce_before_single_product';
    });
    add_filter( 'londom_oos_display_priority', function() {
        return 20;
    });
    ```

## FAQ

### Why isn’t the alternatives block showing?

The plugin only displays alternatives when a product is **completely** out of stock:
*
For simple products: stock must be 0 and backorders disabled * For variable products:
ALL variations must be out of stock or unavailable

Check your product’s stock settings in WooCommerce.

### Can I change how many alternative products are shown?

Yes! Use this filter in your theme’s functions.php:

    ```
    add_filter( 'londom_alternatives_count', function() { return 6; });
    ```

### How are alternative products selected?

The plugin uses a smart two-step process:
 1. **First priority:** Upsell products(
that are in stock) 2. **Fallback:** Products from the most specific categories assigned
to the product, ordered by sales performance

This ensures relevant recommendations every time.

### Is it compatible with my theme?

Yes! The plugin uses standard WooCommerce hooks and includes mobile-first CSS that
adapts to most themes. The styles are minimal and designed to blend with your existing
design.

### Does it work with variable products?

Absolutely! The plugin intelligently checks all variations. If even ONE variation
is available (in stock or with backorders enabled), the normal Add to Cart remains
visible.

### Will it slow down my site?

No. The plugin includes an intelligent caching system that stores alternative product
IDs and validates them on each page load. This “soft-refresh” approach keeps data
accurate while maintaining performance.

### Is it compatible with caching plugins?

Yes! Built-in compatibility with:
 * WP Rocket * W3 Total Cache * LiteSpeed Cache*
WP Fastest Cache

The plugin automatically purges relevant cache when products are updated.

### Can I translate the plugin?

Yes! The plugin is fully translation-ready:
 * Text domain: `londom-out-of-stock-
alternatives` * Compatible with Polylang and WPML * All user-facing strings are 
translatable

### How do I clear the plugin’s cache?

The cache clears automatically when:
 * A product is updated * Stock status changes*
Prices change * Upsells are modified

For manual clearing, deactivate and reactivate the plugin.

### Can I customize the appearance?

Yes! The plugin includes CSS classes you can target:
 * `.londom-oos-wrap` – The
wrapper around the notice and the alternatives * `.londom-oos-banner` – The “out
of stock” notice * `.londom-oos-box` – The alternatives container * `.londom-oos-
grid` – The product grid * `.londom-oos-item` – Individual product cards

Add custom CSS in Customizer  Additional CSS.

### Does it support HPOS (High-Performance Order Storage)?

Yes! The plugin declares full compatibility with WooCommerce HPOS.

### Is there a PRO version?

Not yet, but we’re working on advanced features for a PRO version. The FREE version
will always remain feature-complete for basic needs.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“LONDOM – Out of Stock Alternatives” is open source software. The following people
have contributed to this plugin.

Contributors

 *   [ Domenico Longo ](https://profiles.wordpress.org/londom/)

[Translate “LONDOM – Out of Stock Alternatives” into your language.](https://translate.wordpress.org/projects/wp-plugins/londom-out-of-stock-alternatives)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/londom-out-of-stock-alternatives/),
check out the [SVN repository](https://plugins.svn.wordpress.org/londom-out-of-stock-alternatives/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/londom-out-of-stock-alternatives/)
by [RSS](https://plugins.trac.wordpress.org/log/londom-out-of-stock-alternatives/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.4.0 – 2026-09-26

 * Fixed: The alternatives block is now printed above the product layout, fixing
   the broken columns with Blocksy and other flex/grid themes
 * Added: `londom_oos_display_hook` and `londom_oos_display_priority` filters to
   change where the block is printed
 * Removed: Forced dark color scheme in the block styles
 * Fixed: PHP warning when a variation’s stock changes
 * Improved: Variations now also clear the cache of their parent product
 * Fixed: WP Rocket is now purged only when the stock status changes, not while 
   the block is printed
 * Improved: Fallback alternatives now come only from the most specific categories
   of the product
 * Improved: Previously cached alternatives are invalidated once after the update
 * Changed: All texts are now in English and can be translated on translate.wordpress.
   org

#### 1.3.5 – 2026-02-10

 * Fixed: Plugin file name aligned with WordPress.org slug
 * Fixed: Text domain consistency across all files
 * Improved: Full compliance with WordPress.org requirements
 * Updated: Plugin URI and documentation links

#### 1.3.4 – 2026-02-10

 * Fixed: Text domain aligned with WordPress.org assigned slug
 * Fixed: Plugin name formatting consistency across all files
 * Updated: Minimum requirements – WordPress 6.0+ and PHP 8.0+
 * Improved: Full compliance with WordPress.org plugin guidelines

#### 1.3.2 – 2025-01-22

 * Fixed: Text domain alignment with plugin slug for WordPress.org compliance
 * Fixed: Replaced `_e()` with `esc_html_e()` for safe output
 * Fixed: Added missing translators comments for sprintf placeholders
 * Improved: Cache index system without direct SQL queries
 * Improved: Enhanced code documentation and inline comments
 * Improved: Better error handling for edge cases
 * Tested: WordPress 6.9 compatibility
 * Tested: WooCommerce 9.0 compatibility

#### 1.3.1 – 2024-12-10

 * Added: eBay-like placement at top of product page
 * Added: Soft-refresh cache validation on page hits
 * Added: Context-aware cache support (opt-in)
 * Improved: Extended cache invalidation hooks
 * Improved: Better variable product detection
 * Fixed: Cache clearing on variation updates

#### 1.3.0 – 2024-11-15

 * Initial public release
 * Feature: Automatic out-of-stock detection
 * Feature: Smart alternatives via upsells  category fallback
 * Feature: Mobile-first responsive design
 * Feature: Accessible markup with ARIA labels
 * Feature: Cache system with transients
 * Feature: Multilingual support (Polylang/WPML)
 * Feature: HPOS compatibility

## Meta

 *  Version **1.4.0**
 *  Last updated: **1 week ago**
 *  Active installations: **Fewer than 10**
 *  WordPress Version: ** 6.0 or higher **
 *  Tested up to: **7.1.3**
 *  PHP Version: ** 8.0 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/londom-out-of-stock-alternatives/)
 * Tags:
 * [out of stock](https://en-ca.wordpress.org/plugins/tags/out-of-stock/)[stock management](https://en-ca.wordpress.org/plugins/tags/stock-management/)
   [upsell](https://en-ca.wordpress.org/plugins/tags/upsell/)[woocommerce](https://en-ca.wordpress.org/plugins/tags/woocommerce/)
 *  [Advanced View](https://en-ca.wordpress.org/plugins/londom-out-of-stock-alternatives/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/londom-out-of-stock-alternatives/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/londom-out-of-stock-alternatives/reviews/)

## Contributors

 *   [ Domenico Longo ](https://profiles.wordpress.org/londom/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/londom-out-of-stock-alternatives/)