Title: wp_unregister_ability_category
Published: February 24, 2026
Last modified: August 20, 2026

---

# wp_unregister_ability_category( string $slug ): 󠀁[WP_Ability_Category](https://developer.wordpress.org/reference/classes/wp_ability_category/)󠁿|null

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_unregister_ability_category/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/wp_unregister_ability_category/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/functions/wp_unregister_ability_category/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_unregister_ability_category/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_unregister_ability_category/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_unregister_ability_category/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_unregister_ability_category/?output_format=md#changelog)

Unregisters an ability category.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/wp_unregister_ability_category/?output_format=md#description)󠁿

Removes a previously registered ability category from the global registry. Use this
to disable ability categories that are no longer needed.

Can be called at any time after the ability category has been registered.

Example:

    ```php
    if ( wp_has_ability_category( 'deprecated-category' ) ) {
        wp_unregister_ability_category( 'deprecated-category' );
    }
    ```

### 󠀁[See also](https://developer.wordpress.org/reference/functions/wp_unregister_ability_category/?output_format=md#see-also)󠁿

 * [WP_Ability_Categories_Registry::unregister()](https://developer.wordpress.org/reference/classes/WP_Ability_Categories_Registry/unregister/)
 * [wp_register_ability_category()](https://developer.wordpress.org/reference/functions/wp_register_ability_category/)

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

 `$slug`stringrequired

The slug of the ability category to unregister.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_unregister_ability_category/?output_format=md#return)󠁿

 [WP_Ability_Category](https://developer.wordpress.org/reference/classes/wp_ability_category/)
|null The unregistered ability category instance on success, `null` on failure.

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

    ```php
    function wp_unregister_ability_category( string $slug ): ?WP_Ability_Category {
    	$registry = WP_Ability_Categories_Registry::get_instance();
    	if ( null === $registry ) {
    		return null;
    	}

    	return $registry->unregister( $slug );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/abilities-api.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/abilities-api.php#L690)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/abilities-api.php#L690-L697)

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

| Uses | Description | 
| [WP_Ability_Categories_Registry::get_instance()](https://developer.wordpress.org/reference/classes/wp_ability_categories_registry/get_instance/)`wp-includes/abilities-api/class-wp-ability-categories-registry.php` |

Utility method to retrieve the main instance of the registry class.

  |

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

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

## User Contributed Notes

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