Overview

Features include

  • Set global “in stock”, “low stock”, “out of stock” and available “on backorder” text, inside the WooCommerce settings page.
  • Set stock message per product and product variation by editing the product directly. Product messages will be prioritised over the global settings.
  • Enable stock status messages to display inside the product loop. e.g on the shop and category pages in WooCommerce.
Example of custom stock Status For WooCommerce products.
Setting a custom LOW stock message with emoji in WooCommerce

Why customise the stock text?

  • Let customers know when each product variation is back in stock.
  • Let customers know useful information about the stock status. e.g When a product ships.
  • Provide details for product backorders.
  • customise the in stock message per product.

How to change the stock status text for simple products?

Screenshot of product edit screen with custom stock status fields

Each product type in WooCommerce can have it’s own unique and custom stock status after installing our plugin.

  1. Firstly into the WordPress admin and click on Products in the sidebar.
  2. Go the the it screen of any product.
  3. Fill out the text fields regarding stock text.
  4. Save!

Product fields are prioritised and will be shown instead of the global text fields.

How to change the stock status text for variations?

  1. Navigate to a variable product and click on variations.
  2. Each variation will have it’s own set of text fields where you can set the custom stock status.
  3. Save!

Product Variation fields are prioritised over global fields, and will be shown when the customer selects a variation on the sales page.

Enable stock status on shop & category pages

Our Stock Status plugin includes a feature to enable the stock status fields to appear for each product in the WooCommerce loop.

Screenshot of the global stock message settings in WooCommerce
Global stock messages settings in WooCommerce
  • Shop pages with multiple products
  • Product category & archive pages with multiple products.

Create Dynamic Tags

The real power comes with dynamic tags that you can use within your stock messages. We’ve setup the structure, so it’s ready for your business.

Create any dynamic tags via PHP snippet.

Screenshot of a dynamic date which represents the date it's restocked.

Example: Dynamic dates when products are restocked.

Let’s say your product is back in stock every Monday. We can create a dynamic tag called {monday_pickup}. The tag will always display the date of the next Monday. Customers will always be informed and know when to return to your shop with useful contextual stock messages.

We can add any Dynamic tag via PHP snippet.

/**
 * Create a dynamic date tag to use with Stock Status for WooCommerce by Puri.io
 *
 * @param [type] $tags
 * @param [type] $product
 * @return void
 */
function puri_custom_next_monday_pickup( $tags, $product ) {

		// Set the WordPress timezone and find monday.
		$datetime = date_create( '@' . time() );
		$datetime->setTimezone( wp_timezone() );
		$datetime->modify( 'next monday' );
		$datetime->format( 'd/m/Y' );

		$tags['{monday_pickup}'] = $datetime->format( 'd/m/Y' );

		return $tags;
}

add_filter( 'pwss_dynamic_text_tags', 'puri_custom_next_monday_pickup', 10, 2 );
Code language: PHP (php)
Example of customising the out of stock text for each product variation in WooCommerce.
Example of customising the out of stock text for each product variation

You must log in and be a buyer of this download to submit a review.