Title: wp_update_term
Published: April 25, 2014
Last modified: February 24, 2026

---

# wp_update_term( int $term_id, string $taxonomy, array $args = array() ): array|󠀁[WP_Error](https://developer.wordpress.org/reference/classes/wp_error/)󠁿

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_update_term/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/wp_update_term/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_update_term/?output_format=md#return)
 * [More Information](https://developer.wordpress.org/reference/functions/wp_update_term/?output_format=md#more-information)
 * [Source](https://developer.wordpress.org/reference/functions/wp_update_term/?output_format=md#source)
 * [Hooks](https://developer.wordpress.org/reference/functions/wp_update_term/?output_format=md#hooks)
 * [Related](https://developer.wordpress.org/reference/functions/wp_update_term/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_update_term/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/wp_update_term/?output_format=md#user-contributed-notes)

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

Updates term based on arguments provided.

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

The `$args` will indiscriminately override all values with the same field name.

Care must be taken to not override important information need to update or update
will fail (or perhaps create a new term, neither would be acceptable).

Defaults will set ‘alias_of’, ‘description’, ‘parent’, and ‘slug’ if not defined
in `$args` already.

‘alias_of’ will create a term group, if it doesn’t already exist, and update it 
for the `$term`.

If the ‘slug’ argument in `$args` is missing, then the ‘name’ will be used.
If you
set ‘slug’ and it isn’t unique, then a [WP_Error](https://developer.wordpress.org/reference/classes/wp_error/)
is returned.If you don’t pass any slug, then a unique one will be created.

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

 `$term_id`intrequired

The ID of the term.

`$taxonomy`stringrequired

The taxonomy of the term.

`$args`arrayoptional

Array of arguments for updating a term.

 * `alias_of` string
 * Slug of the term to make this term an alias of.
    Accepts a term slug.
 * `description` string
 * The term description.
 * `parent` int
 * The id of the parent term. Default 0.
 * `slug` string
 * The term slug to use.

Default:`array()`

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

 array|[WP_Error](https://developer.wordpress.org/reference/classes/wp_error/) An
array containing the `term_id` and `term_taxonomy_id`, [WP_Error](https://developer.wordpress.org/reference/classes/wp_error/)
otherwise.

## 󠀁[More Information](https://developer.wordpress.org/reference/functions/wp_update_term/?output_format=md#more-information)󠁿

Any of the following $args will be updated on the term:

 * name
 * slug
 * term_group
 * description
 * parent
 * alias_of (see above)

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

    ```php
    function wp_update_term( $term_id, $taxonomy, $args = array() ) {
    	global $wpdb;

    	if ( ! taxonomy_exists( $taxonomy ) ) {
    		return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
    	}

    	$term_id = (int) $term_id;

    	// First, get all of the original args.
    	$term = get_term( $term_id, $taxonomy );

    	if ( is_wp_error( $term ) ) {
    		return $term;
    	}

    	if ( ! $term ) {
    		return new WP_Error( 'invalid_term', __( 'Empty Term.' ) );
    	}

    	$term = (array) $term->data;

    	// Escape data pulled from DB.
    	$term = wp_slash( $term );

    	// Merge old and new args with new args overwriting old ones.
    	$args = array_merge( $term, $args );

    	$defaults    = array(
    		'alias_of'    => '',
    		'description' => '',
    		'parent'      => 0,
    		'slug'        => '',
    	);
    	$args        = wp_parse_args( $args, $defaults );
    	$args        = sanitize_term( $args, $taxonomy, 'db' );
    	$parsed_args = $args;

    	// expected_slashed ($name)
    	$name        = wp_unslash( $args['name'] );
    	$description = wp_unslash( $args['description'] );

    	$parsed_args['name']        = $name;
    	$parsed_args['description'] = $description;

    	if ( '' === trim( $name ) ) {
    		return new WP_Error( 'empty_term_name', __( 'A name is required for this term.' ) );
    	}

    	if ( (int) $parsed_args['parent'] > 0 && ! term_exists( (int) $parsed_args['parent'] ) ) {
    		return new WP_Error( 'missing_parent', __( 'Parent term does not exist.' ) );
    	}

    	$empty_slug = false;
    	if ( empty( $args['slug'] ) ) {
    		$empty_slug = true;
    		$slug       = sanitize_title( $name );
    	} else {
    		$slug = $args['slug'];
    	}

    	$parsed_args['slug'] = $slug;

    	$term_group = isset( $parsed_args['term_group'] ) ? $parsed_args['term_group'] : 0;
    	if ( $args['alias_of'] ) {
    		$alias = get_term_by( 'slug', $args['alias_of'], $taxonomy );
    		if ( ! empty( $alias->term_group ) ) {
    			// The alias we want is already in a group, so let's use that one.
    			$term_group = $alias->term_group;
    		} elseif ( ! empty( $alias->term_id ) ) {
    			/*
    			 * The alias is not in a group, so we create a new one
    			 * and add the alias to it.
    			 */
    			$term_group = $wpdb->get_var( "SELECT MAX(term_group) FROM $wpdb->terms" ) + 1;

    			wp_update_term(
    				$alias->term_id,
    				$taxonomy,
    				array(
    					'term_group' => $term_group,
    				)
    			);
    		}

    		$parsed_args['term_group'] = $term_group;
    	}

    	/**
    	 * Filters the term parent.
    	 *
    	 * Hook to this filter to see if it will cause a hierarchy loop.
    	 *
    	 * @since 3.1.0
    	 *
    	 * @param int    $parent_term ID of the parent term.
    	 * @param int    $term_id     Term ID.
    	 * @param string $taxonomy    Taxonomy slug.
    	 * @param array  $parsed_args An array of potentially altered update arguments for the given term.
    	 * @param array  $args        Arguments passed to wp_update_term().
    	 */
    	$parent = (int) apply_filters( 'wp_update_term_parent', $args['parent'], $term_id, $taxonomy, $parsed_args, $args );

    	// Check for duplicate slug.
    	$duplicate = get_term_by( 'slug', $slug, $taxonomy );
    	if ( $duplicate && $duplicate->term_id !== $term_id ) {
    		/*
    		 * If an empty slug was passed or the parent changed, reset the slug to something unique.
    		 * Otherwise, bail.
    		 */
    		if ( $empty_slug || ( $parent !== (int) $term['parent'] ) ) {
    			$slug = wp_unique_term_slug( $slug, (object) $args );
    		} else {
    			/* translators: %s: Taxonomy term slug. */
    			return new WP_Error( 'duplicate_term_slug', sprintf( __( 'The slug &#8220;%s&#8221; is already in use by another term.' ), $slug ) );
    		}
    	}

    	$tt_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT tt.term_taxonomy_id FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.term_id = %d", $taxonomy, $term_id ) );

    	// Check whether this is a shared term that needs splitting.
    	$_term_id = _split_shared_term( $term_id, $tt_id );
    	if ( ! is_wp_error( $_term_id ) ) {
    		$term_id = $_term_id;
    	}

    	/**
    	 * Fires immediately before the given terms are edited.
    	 *
    	 * @since 2.9.0
    	 * @since 6.1.0 The `$args` parameter was added.
    	 *
    	 * @param int    $term_id  Term ID.
    	 * @param string $taxonomy Taxonomy slug.
    	 * @param array  $args     Arguments passed to wp_update_term().
    	 */
    	do_action( 'edit_terms', $term_id, $taxonomy, $args );

    	$data = compact( 'name', 'slug', 'term_group' );

    	/**
    	 * Filters term data before it is updated in the database.
    	 *
    	 * @since 4.7.0
    	 *
    	 * @param array  $data     Term data to be updated.
    	 * @param int    $term_id  Term ID.
    	 * @param string $taxonomy Taxonomy slug.
    	 * @param array  $args     Arguments passed to wp_update_term().
    	 */
    	$data = apply_filters( 'wp_update_term_data', $data, $term_id, $taxonomy, $args );

    	$wpdb->update( $wpdb->terms, $data, compact( 'term_id' ) );

    	if ( empty( $slug ) ) {
    		$slug = sanitize_title( $name, $term_id );
    		$wpdb->update( $wpdb->terms, compact( 'slug' ), compact( 'term_id' ) );
    	}

    	/**
    	 * Fires immediately after a term is updated in the database, but before its
    	 * term-taxonomy relationship is updated.
    	 *
    	 * @since 2.9.0
    	 * @since 6.1.0 The `$args` parameter was added.
    	 *
    	 * @param int    $term_id  Term ID.
    	 * @param string $taxonomy Taxonomy slug.
    	 * @param array  $args     Arguments passed to wp_update_term().
    	 */
    	do_action( 'edited_terms', $term_id, $taxonomy, $args );

    	/**
    	 * Fires immediate before a term-taxonomy relationship is updated.
    	 *
    	 * @since 2.9.0
    	 * @since 6.1.0 The `$args` parameter was added.
    	 *
    	 * @param int    $tt_id    Term taxonomy ID.
    	 * @param string $taxonomy Taxonomy slug.
    	 * @param array  $args     Arguments passed to wp_update_term().
    	 */
    	do_action( 'edit_term_taxonomy', $tt_id, $taxonomy, $args );

    	$wpdb->update( $wpdb->term_taxonomy, compact( 'term_id', 'taxonomy', 'description', 'parent' ), array( 'term_taxonomy_id' => $tt_id ) );

    	/**
    	 * Fires immediately after a term-taxonomy relationship is updated.
    	 *
    	 * @since 2.9.0
    	 * @since 6.1.0 The `$args` parameter was added.
    	 *
    	 * @param int    $tt_id    Term taxonomy ID.
    	 * @param string $taxonomy Taxonomy slug.
    	 * @param array  $args     Arguments passed to wp_update_term().
    	 */
    	do_action( 'edited_term_taxonomy', $tt_id, $taxonomy, $args );

    	/**
    	 * Fires after a term has been updated, but before the term cache has been cleaned.
    	 *
    	 * The 'edit_$taxonomy' hook is also available for targeting a specific
    	 * taxonomy.
    	 *
    	 * @since 2.3.0
    	 * @since 6.1.0 The `$args` parameter was added.
    	 *
    	 * @param int    $term_id  Term ID.
    	 * @param int    $tt_id    Term taxonomy ID.
    	 * @param string $taxonomy Taxonomy slug.
    	 * @param array  $args     Arguments passed to wp_update_term().
    	 */
    	do_action( 'edit_term', $term_id, $tt_id, $taxonomy, $args );

    	/**
    	 * Fires after a term in a specific taxonomy has been updated, but before the term
    	 * cache has been cleaned.
    	 *
    	 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
    	 *
    	 * Possible hook names include:
    	 *
    	 *  - `edit_category`
    	 *  - `edit_post_tag`
    	 *
    	 * @since 2.3.0
    	 * @since 6.1.0 The `$args` parameter was added.
    	 *
    	 * @param int   $term_id Term ID.
    	 * @param int   $tt_id   Term taxonomy ID.
    	 * @param array $args    Arguments passed to wp_update_term().
    	 */
    	do_action( "edit_{$taxonomy}", $term_id, $tt_id, $args );

    	/** This filter is documented in wp-includes/taxonomy.php */
    	$term_id = apply_filters( 'term_id_filter', $term_id, $tt_id );

    	clean_term_cache( $term_id, $taxonomy );

    	/**
    	 * Fires after a term has been updated, and the term cache has been cleaned.
    	 *
    	 * The 'edited_$taxonomy' hook is also available for targeting a specific
    	 * taxonomy.
    	 *
    	 * @since 2.3.0
    	 * @since 6.1.0 The `$args` parameter was added.
    	 *
    	 * @param int    $term_id  Term ID.
    	 * @param int    $tt_id    Term taxonomy ID.
    	 * @param string $taxonomy Taxonomy slug.
    	 * @param array  $args     Arguments passed to wp_update_term().
    	 */
    	do_action( 'edited_term', $term_id, $tt_id, $taxonomy, $args );

    	/**
    	 * Fires after a term for a specific taxonomy has been updated, and the term
    	 * cache has been cleaned.
    	 *
    	 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
    	 *
    	 * Possible hook names include:
    	 *
    	 *  - `edited_category`
    	 *  - `edited_post_tag`
    	 *
    	 * @since 2.3.0
    	 * @since 6.1.0 The `$args` parameter was added.
    	 *
    	 * @param int   $term_id Term ID.
    	 * @param int   $tt_id   Term taxonomy ID.
    	 * @param array $args    Arguments passed to wp_update_term().
    	 */
    	do_action( "edited_{$taxonomy}", $term_id, $tt_id, $args );

    	/** This action is documented in wp-includes/taxonomy.php */
    	do_action( 'saved_term', $term_id, $tt_id, $taxonomy, true, $args );

    	/** This action is documented in wp-includes/taxonomy.php */
    	do_action( "saved_{$taxonomy}", $term_id, $tt_id, true, $args );

    	return array(
    		'term_id'          => $term_id,
    		'term_taxonomy_id' => $tt_id,
    	);
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/taxonomy.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/taxonomy.php#L3216)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/taxonomy.php#L3216-L3501)

## 󠀁[Hooks](https://developer.wordpress.org/reference/functions/wp_update_term/?output_format=md#hooks)󠁿

 [do_action( ‘edited_term’, int $term_id, int $tt_id, string $taxonomy, array $args )](https://developer.wordpress.org/reference/hooks/edited_term/)

Fires after a term has been updated, and the term cache has been cleaned.

 [do_action( ‘edited_terms’, int $term_id, string $taxonomy, array $args )](https://developer.wordpress.org/reference/hooks/edited_terms/)

Fires immediately after a term is updated in the database, but before its term-taxonomy
relationship is updated.

 [do_action( ‘edited_term_taxonomy’, int $tt_id, string $taxonomy, array $args )](https://developer.wordpress.org/reference/hooks/edited_term_taxonomy/)

Fires immediately after a term-taxonomy relationship is updated.

 [do_action( “edited_{$taxonomy}”, int $term_id, int $tt_id, array $args )](https://developer.wordpress.org/reference/hooks/edited_taxonomy/)

Fires after a term for a specific taxonomy has been updated, and the term cache 
has been cleaned.

 [do_action( ‘edit_term’, int $term_id, int $tt_id, string $taxonomy, array $args )](https://developer.wordpress.org/reference/hooks/edit_term/)

Fires after a term has been updated, but before the term cache has been cleaned.

 [do_action( ‘edit_terms’, int $term_id, string $taxonomy, array $args )](https://developer.wordpress.org/reference/hooks/edit_terms/)

Fires immediately before the given terms are edited.

 [do_action( ‘edit_term_taxonomy’, int $tt_id, string $taxonomy, array $args )](https://developer.wordpress.org/reference/hooks/edit_term_taxonomy/)

Fires immediate before a term-taxonomy relationship is updated.

 [do_action( “edit_{$taxonomy}”, int $term_id, int $tt_id, array $args )](https://developer.wordpress.org/reference/hooks/edit_taxonomy/)

Fires after a term in a specific taxonomy has been updated, but before the term 
cache has been cleaned.

 [do_action( ‘saved_term’, int $term_id, int $tt_id, string $taxonomy, bool $update, array $args )](https://developer.wordpress.org/reference/hooks/saved_term/)

Fires after a term has been saved, and the term cache has been cleared.

 [do_action( “saved_{$taxonomy}”, int $term_id, int $tt_id, bool $update, array $args )](https://developer.wordpress.org/reference/hooks/saved_taxonomy/)

Fires after a term in a specific taxonomy has been saved, and the term cache has
been cleared.

 [apply_filters( ‘term_id_filter’, int $term_id, int $tt_id, array $args )](https://developer.wordpress.org/reference/hooks/term_id_filter/)

Filters the term ID after a new term is created.

 [apply_filters( ‘wp_update_term_data’, array $data, int $term_id, string $taxonomy, array $args )](https://developer.wordpress.org/reference/hooks/wp_update_term_data/)

Filters term data before it is updated in the database.

 [apply_filters( ‘wp_update_term_parent’, int $parent_term, int $term_id, string $taxonomy, array $parsed_args, array $args )](https://developer.wordpress.org/reference/hooks/wp_update_term_parent/)

Filters the term parent.

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

| Uses | Description | 
| [sanitize_title()](https://developer.wordpress.org/reference/functions/sanitize_title/)`wp-includes/formatting.php` |

Sanitizes a string into a slug, which can be used in URLs or HTML attributes.

  | 
| [clean_term_cache()](https://developer.wordpress.org/reference/functions/clean_term_cache/)`wp-includes/taxonomy.php` |

Removes all of the term IDs from the cache.

  | 
| [wp_update_term()](https://developer.wordpress.org/reference/functions/wp_update_term/)`wp-includes/taxonomy.php` |

Updates term based on arguments provided.

  | 
| [wp_unique_term_slug()](https://developer.wordpress.org/reference/functions/wp_unique_term_slug/)`wp-includes/taxonomy.php` |

Makes term slug unique, if it isn’t already.

  | 
| [sanitize_term()](https://developer.wordpress.org/reference/functions/sanitize_term/)`wp-includes/taxonomy.php` |

Sanitizes all term fields.

  | 
| [term_exists()](https://developer.wordpress.org/reference/functions/term_exists/)`wp-includes/taxonomy.php` |

Determines whether a taxonomy term exists.

  | 
| [get_term_by()](https://developer.wordpress.org/reference/functions/get_term_by/)`wp-includes/taxonomy.php` |

Gets all term data from database by term field and data.

  | 
| [taxonomy_exists()](https://developer.wordpress.org/reference/functions/taxonomy_exists/)`wp-includes/taxonomy.php` |

Determines whether the taxonomy name exists.

  | 
| [wpdb::update()](https://developer.wordpress.org/reference/classes/wpdb/update/)`wp-includes/class-wpdb.php` |

Updates a row in the table.

  | 
| [__()](https://developer.wordpress.org/reference/functions/__/)`wp-includes/l10n.php` |

Retrieves the translation of $text.

  | 
| [wp_slash()](https://developer.wordpress.org/reference/functions/wp_slash/)`wp-includes/formatting.php` |

Adds slashes to a string or recursively adds slashes to strings within an array.

  | 
| [wp_unslash()](https://developer.wordpress.org/reference/functions/wp_unslash/)`wp-includes/formatting.php` |

Removes slashes from a string or recursively removes slashes from strings within an array.

  | 
| [wp_parse_args()](https://developer.wordpress.org/reference/functions/wp_parse_args/)`wp-includes/functions.php` |

Merges user defined arguments into defaults array.

  | 
| [get_term()](https://developer.wordpress.org/reference/functions/get_term/)`wp-includes/taxonomy.php` |

Gets all term data from database by term ID.

  | 
| [apply_filters()](https://developer.wordpress.org/reference/functions/apply_filters/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to a filter hook.

  | 
| [do_action()](https://developer.wordpress.org/reference/functions/do_action/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to an action hook.

  | 
| [wpdb::get_var()](https://developer.wordpress.org/reference/classes/wpdb/get_var/)`wp-includes/class-wpdb.php` |

Retrieves one value from the database.

  | 
| [wpdb::prepare()](https://developer.wordpress.org/reference/classes/wpdb/prepare/)`wp-includes/class-wpdb.php` |

Prepares a SQL query for safe execution.

  | 
| [is_wp_error()](https://developer.wordpress.org/reference/functions/is_wp_error/)`wp-includes/load.php` |

Checks whether the given variable is a WordPress Error.

  | 
| [WP_Error::__construct()](https://developer.wordpress.org/reference/classes/wp_error/__construct/)`wp-includes/class-wp-error.php` |

Initializes the error.

  |

[Show 15 more](https://developer.wordpress.org/reference/functions/wp_update_term/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/wp_update_term/?output_format=md#)

| Used by | Description | 
| [WP_REST_Terms_Controller::update_item()](https://developer.wordpress.org/reference/classes/wp_rest_terms_controller/update_item/)`wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php` |

Updates a single term from a taxonomy.

  | 
| [wp_insert_category()](https://developer.wordpress.org/reference/functions/wp_insert_category/)`wp-admin/includes/taxonomy.php` |

Updates an existing Category or creates a new Category.

  | 
| [wp_ajax_inline_save_tax()](https://developer.wordpress.org/reference/functions/wp_ajax_inline_save_tax/)`wp-admin/includes/ajax-actions.php` |

Handles Quick Edit saving for a term via AJAX.

  | 
| [wp_check_term_hierarchy_for_loops()](https://developer.wordpress.org/reference/functions/wp_check_term_hierarchy_for_loops/)`wp-includes/taxonomy.php` |

Checks the given subset of the term hierarchy for hierarchy loops.

  | 
| [wp_update_term()](https://developer.wordpress.org/reference/functions/wp_update_term/)`wp-includes/taxonomy.php` |

Updates term based on arguments provided.

  | 
| [wp_insert_term()](https://developer.wordpress.org/reference/functions/wp_insert_term/)`wp-includes/taxonomy.php` |

Adds a new term to the database.

  | 
| [wp_update_nav_menu_object()](https://developer.wordpress.org/reference/functions/wp_update_nav_menu_object/)`wp-includes/nav-menu.php` |

Saves the properties of a menu or create a new menu with those properties.

  | 
| [wp_xmlrpc_server::wp_editTerm()](https://developer.wordpress.org/reference/classes/wp_xmlrpc_server/wp_editterm/)`wp-includes/class-wp-xmlrpc-server.php` |

Edits a term.

  |

[Show 3 more](https://developer.wordpress.org/reference/functions/wp_update_term/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/wp_update_term/?output_format=md#)

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

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

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/wp_update_term/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/functions/wp_update_term/?output_format=md#comment-content-788)
 2.   [Codex](https://profiles.wordpress.org/codex/)  [  11 years ago  ](https://developer.wordpress.org/reference/functions/wp_update_term/#comment-788)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_update_term%2F%23comment-788)
    Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_update_term%2F%23comment-788)
 4. **Rename the ‘Uncategorized’ category in French**
 5.     ```php
        $update = wp_update_term( 1, 'category', array(
        	'name' => 'Non Catégorisé',
        	'slug' => 'non-categorise'
        ) );
    
        if ( ! is_wp_error( $update ) ) {
        	echo 'Success!';
        }
        ```
    
 6.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_update_term%2F%3Freplytocom%3D788%23feedback-editor-788)

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