Disable Elementor AI for all users except Admin

By default, the AI feature in Elementor is enabled for all users, and each request to this feature counts toward your credits. If you don’t want this, you can disable Elementor AI for all users except yourself (as an Admin) by using the snippet below.
The snippet code
Add this snippet code to your functions.php
, or using a snippet code plugin to implement this:
function disable_elementor_ai_for_non_admins($value, $option, $user) {
// Allow Elementor AI for admins
if (is_super_admin($user->ID)) {
return $value; // Keep the original setting for super admins
}
// Disable AI for all other users
return null;
}
// Apply the filter to Elementor AI user option
add_filter('get_user_option_' . Elementor\Modules\Ai\Preferences::ENABLE_AI, 'disable_elementor_ai_for_non_admins', 10, 3);
Although users can normally enable Elementor AI for themselves on their Profile page, once the snippet is active, they will no longer be able to do so.
Done.