WP Webhooks / Docs / fswa_ability_permitted
Filter since v2.0.0

fswa_ability_permitted

Filters whether the current request may invoke a Webhook Actions ability through the Abilities API surface.

$

/ Signature

apply_filters( 'fswa_ability_permitted', $allowed, $scope )

/ When it fires

Fires as the permission callback whenever an ability is invoked through the WordPress Abilities API (including MCP adapters). The in-admin Build with AI panel uses its own admin gate and does not pass through this filter.

/ Parameters

NameInTypeReqDescription
$allowedparamboolyesWhether access is granted. Default: current user has `manage_options`.
$scopeparamstringyesRequired registry scope for the ability: `read` or `full`.

/ Returns

bool Whether the ability may run for this request.

/ Examples

Allow editors to run read-scope abilities

add_filter( 'fswa_ability_permitted', function ( $allowed, $scope ) {
    if ( 'read' === $scope && current_user_can( 'edit_others_posts' ) ) {
        return true;
    }
    return $allowed;
}, 10, 2 );

/ Related

Ready

Your next automation is
one sentence away.

$ wp plugin install flowsystems-webhook-actions --activate