gpi_temporary_payment_statuses
Description
Filter payment statuses that should count towards inventory for a limited time after entry creation. Return an associative array where the keys are payment statuses and the values are the number of seconds the reservation should remain in effect.
Usage
Applied globally
add_filter( 'gpi_temporary_payment_statuses', 'my_custom_function' );Applied to specific form
add_filter( 'gpi_temporary_payment_statuses_FORMID', 'my_custom_function' );Applied to specific field
add_filter( 'gpi_temporary_payment_statuses_FORMID_FIELDID', 'my_custom_function' );Parameters
$temporary_statuses
array
Associative array of payment statuses => duration in seconds.
$field
GF_Field
Field for which inventory is being queried.
Examples
Temporarily counts 'Processing' payment status towards inventory limit for 5 minutes.
add_filter( 'gpi_temporary_payment_statuses', function ( $temporary_statuses, $field ) {
$temporary_statuses['Processing'] = 5 * MINUTE_IN_SECONDS;
return $temporary_statuses;
}, 10, 2 );Since
1.0.18Hook added.