Custom Availability Messages for WooCommerce

Description

Give shoppers clearer product availability messages and tell them when an order is expected to ship. Set store-wide defaults and override them for a category, product or variation. Edit each stock state separately and see the result in the live preview before saving.

Stock messages for each product

  • Write custom stock messages for In stock, Low stock, On backorder and Out of stock.
  • Set an optional text color, hide the message, or inherit it from another scope.
  • Use the translated placeholder as a suggestion, or choose Use example to insert editable text.
  • Use category priorities to decide which category supplies a rule when several apply.

Dispatch lead times

  • Set a single value or a range in hours, calendar days or business days, with separate rules per stock state.
  • Insert {lead_time} to display the effective value in a stock message. A message using the token updates when its inherited lead time changes.
  • Display calendar days as days or calendar days. The wording can follow its own inheritance rule while the underlying dispatch time stays the same.
  • Add an optional message for products without a configured lead time.
  • On supported single-product forms, show the backorder message when the selected quantity exceeds tracked stock and WooCommerce allows backorders.

Dispatch lead time is the time until a product is shipped. Delivery time also includes the carrier’s transit time after dispatch.

Examples

  • Ships in 24 hours for items in your warehouse.
  • Only a few left in stock when a product reaches WooCommerce’s low-stock threshold.
  • Available to order — ships in 7–14 days for backordered products.
  • Give a made-to-order category its own dispatch range, then set a separate value for a product that takes longer to prepare.
  • Update a category’s lead time once to refresh messages wherever products inherit that term and use {lead_time}.

The plugin supports classic WooCommerce product pages and the Product Stock Indicator block, including variation selection. It is compatible with High-Performance Order Storage (HPOS). WooCommerce still controls stock levels, stock status, pricing and checkout. The plugin is free and WooCommerce is its only plugin dependency. External integrations can read the effective dispatch time through the PHP API.

Screenshots

Installation

  1. Use WordPress 7.0 or later, PHP 8.3 or later and an active installation of WooCommerce 11.2 or later.
  2. Install and activate Custom Availability Messages for WooCommerce.
  3. Go to Plugins > Installed Plugins and select Settings below the plugin name. This opens WooCommerce > Settings > Products > Availability messages. Expand Getting started for a quick guide.
  4. To add an override, edit a product category, open Product data > Inventory for a product, or expand Availability messages inside a variation.

FAQ

Which rule takes precedence?

For each stock state, the plugin checks the variation, the product, its directly assigned categories, their ancestors and global settings in that order. Within each category group, higher priority numbers win. Ties use category depth and then the lowest category ID. If no Low stock rule applies, the plugin checks the In stock hierarchy. If no message applies, WooCommerce uses its default.

What happens when I hide a message or leave it blank?

Hide stops message inheritance and removes the stock message. A blank custom message inherits. Hiding a message still lets integrations read its effective dispatch time.

How do I add a dispatch time to a message?

Open Dispatch lead time and enter a minimum. Leave the maximum blank for a single value. Zero is accepted. Inherit looks for a rule in the next scope. No lead time stops numeric inheritance. Under Custom message, enable Replace the token with the effective lead time, then use Insert {lead_time} and check the result in the live preview. If the time is missing, the message falls back to your optional text or the applicable WooCommerce default.

Can I keep an inherited lead time and show a shorter unit?

Yes. When the effective unit is Calendar days, choose Use short unit name to show a value such as 5–7 days, or Use full unit name to show 5–7 calendar days. The wording preference inherits independently of the numeric rule. When no preference applies, the full label is used.

How can an integration read the dispatch time?

After WooCommerce has initialized, call \PiotrPesta\CustomAvailabilityMessages\get_effective_lead_time( $product_or_id, $state ). Pass a variation ID or its WooCommerce object to resolve that variation. Omit the state to use the current presentation state. The API returns the unit, minimum, maximum, status and source. It returns calendar_days for both calendar-day labels and null for an invalid product or state. Check that the function is callable before using it. The installable ZIP includes the full contract in docs/public-api.md.

Does the plugin calculate delivery dates or sync with Google Merchant Center?

CAM displays the configured time until dispatch. It does not calculate delivery dates, manage a holiday calendar or sync with Google Merchant Center on its own. External integrations can read the effective dispatch time through the PHP API.

Can the message change when shoppers select a larger quantity?

Yes. The classic WooCommerce product form and the Product Stock Indicator inside the Add to Cart with Options block can switch from the in-stock or low-stock message to the backorder message. WooCommerce must track the stock and allow backorders. The change reflects the quantity selected on the product page. It does not include units already in the cart. WooCommerce still validates purchases and stock.

The browser compares the selected quantity with the in-stock threshold without making a request. If WooCommerce hides that stock count, CAM leaves the feature off unless you enable Allow this also when stock quantities are hidden under Dynamic availability messages, immediately below Getting started. Enabling it lets a visitor determine the threshold. Without JavaScript, the original message remains.

What happens when I deactivate or delete the plugin?

Deactivation restores the WooCommerce display and keeps your settings. Deleting the plugin removes its settings from the installation.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Custom Availability Messages for WooCommerce” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.0

  • Initial public release with custom stock messages and independently inherited dispatch lead times.
  • Add single values, ranges and an optional short label for calendar days.
  • Include the getting-started guide, live preview, message examples and {lead_time} token.
  • Support the Product Stock Indicator block and provide a read-only PHP API and bundled Polish translations.
  • Update storefront messages when the selected quantity crosses the in-stock threshold, with an explicit opt-in when WooCommerce hides the stock count.