Skip to main content

Action: gform_after_execute_ability

Fires after a Gravity Forms ability has executed.

This action fires for both successful results and WP_Error returns, but only when the ability's permission check passed. It cannot modify the result.

Parameters

NameTypeDescription
$ability_namestringThe registered ability name.
$inputarrayThe input passed to the ability.
$resultmixedThe execution result (may be a WP_Error).
$ability_object\GF_AbilityThe ability instance that was executed.

Example

add_action( 'gform_after_execute_ability', function( $name, $input, $result, $ability ) {
if ( is_wp_error( $result ) ) {
GFCommon::log_error( "Ability {$name} failed: " . $result->get_error_message() );
}
}, 10, 4 );

Since

  • 3.1.0

Source

Defined in includes/abilities/class-gf-ability.php at line 203