Description
The “gform_payment_statuses” filter in Gravity Forms allows custom payment statuses to be defined. Refer to Gravity Forms Entry Payment Statuses article for more information about payment statuses.
Usage
add_filter('gform_payment_statuses', 'your_function_name', 10, 1);
Parameters
- $payment_statuses array
An array of entry payment statuses with the entry value as the key (15 char max) to the text for display.
Examples
add_filter('gform_payment_statuses', 'add_new_status', 10, 1);
function add_new_status($payment_statuses) {
$payment_statuses['Tested'] = 'Tested';
return $payment_statuses;
}
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Since
This filter was added in Gravity Forms 2.4.
Source Code
This filter is located in GFCommon::get_entry_payment_statuses() in gravityforms/common.php.