C_AddOns.EnableAddOn

From Warcraft Wiki
Jump to navigation Jump to search

Enables an addon on the next session.

C_AddOns.EnableAddOn(name [, character])

Arguments

name
string|number - The name of the addon to be enabled, or an index from 1 to C_AddOns.GetNumAddOns. Blizzard addons can only be enabled by name.
character
string? - The name of the character, excluding the realm name. If omitted, enables the addon for all characters.

Example

Enables an addon for all characters on the current realm.

C_AddOns.EnableAddOn("HelloWorld")

Enables an addon only for the current character.

C_AddOns.EnableAddOn("HelloWorld", UnitName("player"))

Details

Related API C_AddOns.DisableAddOn

Patch changes

Dragonflight Patch 10.2.0 (2023-11-07): Namespaced to C_AddOns. This now defaults to all characters instead of the current character if the character param is omitted.