protected function _updateObject( $term, $fields ) {
		$fields = array_merge( array( 'taxonomy' => $this->_taxonomy ), $fields );
		$taxonomy = is_object( $term ) ? $term->taxonomy : $this->_taxonomy;

		$term_id_pair = wp_update_term( $term, $taxonomy, $fields );
		if ( is_wp_error( $term_id_pair ) ) {
			$this->_debug(
				'Update failed for term %d with message [%s] %s',
				is_object( $term ) ? $term->term_id : $term,
				$term_id_pair->get_error_code(),
				$term_id_pair->get_error_message()
			);

			return $term_id_pair;
		}

		$this->_debug( 'Updated term ' . $term_id_pair['term_id'] );

		return $term_id_pair['term_id'];
	}
protected function _updateObject( $term, $fields ) {
		$fields = array_merge( array( 'taxonomy' => $this->_taxonomy ), $fields );
		$taxonomy = is_object( $term ) ? $term->taxonomy : $this->_taxonomy;

		$term_id_pair = wp_update_term( $term, $taxonomy, $fields );
		if ( is_wp_error( $term_id_pair ) ) {
			$this->_debug(
				'Update failed for term %d with message [%s] %s',
				is_object( $term ) ? $term->term_id : $term,
				$term_id_pair->get_error_code(),
				$term_id_pair->get_error_message()
			);

			return $term_id_pair;
		}

		$this->_debug( 'Updated term ' . $term_id_pair['term_id'] );

		return $term_id_pair['term_id'];
	}
protected function _updateObject ( $ term , $ fields ) { $ fields = array_merge ( array ( 'taxonomy' => $ this -> _taxonomy ) , $ fields ) ; $ taxonomy = is_object ( $ term ) ? $ term -> taxonomy : $ this -> _taxonomy ; $ term_id_pair = wp_update_term ( $ term , $ taxonomy , $ fields ) ; if ( is_wp_error ( $ term_id_pair ) ) { $ this -> _debug ( 'Update failed for term %d with message [%s] %s' , is_object ( $ term ) ? $ term -> term_id : $ term , $ term_id_pair -> get_error_code ( ) , $ term_id_pair -> get_error_message ( ) ) ; return $ term_id_pair ; } $ this -> _debug ( 'Updated term ' . $ term_id_pair [ 'term_id' ] ) ; return $ term_id_pair [ 'term_id' ] ; }
Updates generated term.

@since 1.0.0

@access protected
@param mixed $term The term id to update.
@param array $fields The array of fields to update.
@return mixed Updated term ID on success, otherwise a WP_Error object.
Updates generated term .