gpi_inventory_available_message

  1. Description
  2. Usage
  3. Parameters
  4. Examples
  5. Since

Description

Filter the inventory available message.

Usage

Apply to all fields on all forms.

add_filter( 'gpi_inventory_available_message', 'my_custom_function' );

Apply to all fields on a specific form.

add_filter( 'gpi_inventory_available_message_FORMID', 'my_custom_function' );

Apply to a specific field on a specific form.

add_filter( 'gpi_inventory_available_message_FORMID_FIELDID', 'my_custom_function' );

Parameters

The default inventory available message.

Examples

add_filter( 'gpi_inventory_available_message', function() {
   return "({available} {item|items} still in stock)";
} );

Since

This filter is available since Gravity Forms Inventory 1.0-beta-3.42.