跳到内容

LONDOM – Out of Stock Alternatives

v1.5.0

Domenico Longo · 2026年2月28日 上架

Stop losing customers on out-of-stock WooCommerce pages: show in-stock alternatives, upsells first, then products from the most specific category.

正在使用
10 以下
评分
暂无
累计下载
801
最近更新
2026年11月17日
需要 WordPress 6.0+已测试到 7.1.5PHP 8.0+

贡献者

截图

Alternatives block with the plugin grid on an out-of-stock product page (mobile view)
Alternatives block with the plugin grid on an out-of-stock product page (mobile view)
The same block on desktop with the "Theme cards" appearance: the alternatives use your theme's own product cards, side by side in one row
The same block on desktop with the "Theme cards" appearance: the alternatives use your theme's own product cards, side by side in one row
Settings in WooCommerce > Settings > Products > Out of stock alternatives
Settings in WooCommerce > Settings > Products > Out of stock alternatives
Choosing the upsells in the product's Linked Products tab
Choosing the upsells in the product's Linked Products tab

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).

Settings

Go to WooCommerce > Settings > Products > Out of stock alternatives. There are two options:

  • Alternatives source – “Upsells, then category” (default) or “Upsells only”. With “Upsells only”, products from the category are never added; if no upsell is available, the box says there are no alternatives.
  • Appearance – “Plugin grid” (default) or “Theme cards”. Theme cards print the alternatives with the standard WooCommerce product loop, so they take the look of your theme (image, title, price and, depending on the theme, the Add to Cart button and badges).

Filters in code take precedence over these settings. Changing a setting clears the cached alternatives.

Key Features

  • Native look option – Show the alternatives as your theme’s own product cards, or keep the plugin’s grid

  • 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_oos_alternatives_source – Force the source: upsells_category or upsells_only (overrides the setting)
  • londom_oos_display_layout – Force the appearance: grid or theme (overrides the setting)
  • londom_oos_theme_columns – Columns passed to the theme product loop (default 4)
  • 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.

Additional Information

About LondomLab

LondomLab creates practical WooCommerce tools that help online stores increase sales and improve customer experience. Visit 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.

Credits

Developed with ❤️ by the LondomLab team.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums