gpi_allow_negative_stock
Description
Filter whether negative stock should be allowed.
Usage
Apply to all fields on all forms.
add_filter( 'gpi_allow_negative_stock', 'my_custom_function' );
Apply to all fields on a specific form.
add_filter( 'gpi_allow_negative_stock_FORMID', 'my_custom_function' );
Apply to a specific field on a specific form.
add_filter( 'gpi_allow_negative_stock_FORMID_FIELDID', 'my_custom_function' );
Parameters
- allow_negative_stock boolean
true
to allow negative stock.
- target_field GF_Field
The current field.
- form array
The current form.
Examples
Allow negative stock to be applied on all forms.
add_filter( 'gpi_allow_negative_stock', '__return_true' );
Since
This filter is available since Gravity Forms Inventory 1.0-beta-3.40.