Documentation

Learn how to install and use the Londom OOS Alternatives plugin.

Quick Start Guide

1. Installation

  • Go to Plugins → Add New → Upload Plugin in your WordPress dashboard.
  • Upload the ZIP file for Londom OOS Alternatives.
  • Click Install Now then Activate.

2. How it works

  • On product pages that are completely out of stock, the plugin shows an alternatives box.
  • Priority: Upsells (if set). Fallback: same-category products in stock.
  • Out-of-the-box: no settings required.

3. Theme compatibility

  • Works with standard WooCommerce hooks on single product pages.
  • If your theme heavily customizes templates, ensure it keeps the default woocommerce_single_product_summary hook.

4. Caching

  • Alternatives use transient caching with soft-refresh.
  • Cache is automatically cleared on stock/status/price/upsell updates.

Customization (Filters)

Texts & layout

  • londom_oos_notice_text — banner message shown above the block.
  • londom_alternatives_title — section title.
  • londom_view_all_text — “View all” button label.
  • londom_alternatives_count — number of items (default: 4).
  • londom_load_inline_styles — return false to disable inline CSS and enqueue your own.

Query behavior

  • londom_alternative_products_query_args — filter WooCommerce args for the fallback query.
  • londom_vip_relax_queries — return true to avoid exclude/meta_key/tax_query (VIP-friendly).

Examples

// Change banner text
add_filter('londom_oos_notice_text', function($t){ return 'This product is sold out — here are some alternatives 👇'; });

// Show 6 items
add_filter('londom_alternatives_count', function(){ return 6; });

// Disable inline styles (to enqueue your CSS)
add_filter('londom_load_inline_styles', '__return_false');

Troubleshooting

If the alternatives block does not appear:

  • Ensure the product is completely out of stock (no purchasable variations or backorders).
  • Temporarily switch to a default theme (Storefront/Twenty*) to rule out template overrides.
  • Clear page cache (WP Rocket, LiteSpeed, W3TC, etc.).
  • Disable custom CSS if you overrode the inline styles.