gpi_is_in_stock

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

Description

Filter whether the current field is in stock.

Usage

Apply to all applicable fields on all forms.

add_filter( 'gpi_is_in_stock', '__return_true' );

Apply to all applicable fields on a specific form.

add_filter( 'gpi_is_in_stock_FORMID', '__return_true' );

Apply to a specific field on a specific form.

add_filter( 'gpi_is_in_stock_FORMID_FIELDID', '__return_true' );

Parameters

  • is_in_stock bool

    Whether the current field is in stock.

  • available_stock int|null

    The amount of available stock. Will return null for choice-based fields.

Since

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