gpi_out_of_stock_message

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

Description

Filter validation message when the item is out of stock.

Usage

Apply to all fields on all forms.

add_filter( 'gpi_out_of_stock_message', 'my_custom_function' );

Apply to all fields on a specific form.

add_filter( 'gpi_out_of_stock_message_FORMID', 'my_custom_function' );

Apply to a specific field on a specific form.

add_filter( 'gpi_out_of_stock_message_FORMID_FIELDID', 'my_custom_function' );

Parameters

  • out_of_stock_message string

    Validation message.

  • form array

    The current form.

  • field GF_Field

    The current field.

  • inventory_data array

    Includes the limit, count, requested count, and available count.

Since

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