gpi_inventory_insufficient_message

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

Description

Filter the inventory insufficient message.

Usage

Apply to all fields on all forms.

add_filter( 'gpi_inventory_insufficient_message', 'my_custom_function' );

Apply to all fields on a specific form.

add_filter( 'gpi_inventory_insufficient_message_FORMID', 'my_custom_function' );

Apply to a specific field on a specific form.

add_filter( 'gpi_inventory_insufficient_message_FORMID_FIELDID', 'my_custom_function' );

Parameters

The default insufficient exhausted message.

Examples

add_filter( 'gpi_inventory_insufficient_message', function() {
   return "You requested {requested} of this item but only {available} is left.";
} );

Since

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