Title: wp_ai_client_prevent_prompt
Published: May 20, 2026

---

# apply_filters( ‘wp_ai_client_prevent_prompt’, bool $prevent, WP_AI_Client_Prompt_Builder $builder )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/wp_ai_client_prevent_prompt/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/wp_ai_client_prevent_prompt/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/wp_ai_client_prevent_prompt/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/wp_ai_client_prevent_prompt/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/wp_ai_client_prevent_prompt/?output_format=md#wp--skip-link--target)

Filters whether to prevent the prompt from being executed.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/wp_ai_client_prevent_prompt/?output_format=md#parameters)󠁿

 `$prevent`bool

Whether to prevent the prompt. Default false.

`$builder`[WP_AI_Client_Prompt_Builder](https://developer.wordpress.org/reference/classes/wp_ai_client_prompt_builder/)

A clone of the prompt builder instance (read-only).

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/wp_ai_client_prevent_prompt/?output_format=md#source)󠁿

    ```php
    $prevent = (bool) apply_filters( 'wp_ai_client_prevent_prompt', false, clone $this );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/ai-client/class-wp-ai-client-prompt-builder.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/ai-client/class-wp-ai-client-prompt-builder.php#L322)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/ai-client/class-wp-ai-client-prompt-builder.php#L322-L322)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/wp_ai_client_prevent_prompt/?output_format=md#related)󠁿

| Used by | Description | 
| [WP_AI_Client_Prompt_Builder::__call()](https://developer.wordpress.org/reference/classes/wp_ai_client_prompt_builder/__call/)`wp-includes/ai-client/class-wp-ai-client-prompt-builder.php` |

Magic method to proxy snake_case method calls to their PHP AI Client camelCase counterparts.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/wp_ai_client_prevent_prompt/?output_format=md#changelog)󠁿

| Version | Description | 
| [7.0.0](https://developer.wordpress.org/reference/since/7.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_ai_client_prevent_prompt%2F)
before being able to contribute a note or feedback.