gform_kit_enable_legacy_connection

Description

The gform_kit_enable_legacy_connection filter allows you to force the Kit Add-On to use a legacy API connection method.

Note: The legacy v3 connection method is deprecated. For new integrations, use the v4 API Key (available for all accounts, with limitations) or OAuth (available for Kit paid accounts only).

Usage

add_filter( 'gform_kit_enable_legacy_connection', 'your_function_name', 10, 1 );

Parameters

NameTypeDescription
$enable_legacyboolWhether to enable the legacy connection. Default is false.

Examples

Force the legacy connection method.

add_filter( 'gform_kit_enable_legacy_connection', function( $enable_legacy ) {
    // Enable the legacy API key/secret connection method.
    return true;
}, 10, 1 );

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

Added in Gravity Forms Kit Add-On v2.0.0.

Source Code

This filter is located in includes/class-gf-convertkit.php.