---
id: gform_after_execute_ability
title: "Action - gform_after_execute_ability"
sidebar_label: "gform_after_execute_ability"
tags:
  - "3.1.0"
---

# 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

| Name | Type | Description |
|------|------|-------------|
| $ability_name | `string` | The registered ability name. |
| $input | `array` | The input passed to the ability. |
| $result | `mixed` | The execution result (may be a WP_Error). |
| $ability_object | `\GF_Ability` | The ability instance that was executed. |

## Example

```php
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

