WordPress at a glance
function is not described

wc_update_attribute() WC 3.2.0

Update an attribute.

For available args see wc_create_attribute().

No Hooks.

Return

Int/WP_Error.

Usage

wc_update_attribute( $id, $args );
$id(int) (required)
Attribute ID.
$args(array) (required)
Attribute arguments.

Changelog

Since 3.2.0 Introduced.

Code of wc update attribute: woocommerce/includes/wc-attribute-functions.php WC 3.7.0

<?php
function wc_update_attribute( $id, $args ) {
	global $wpdb;

	$attribute = wc_get_attribute( $id );

	$args['id'] = $attribute ? $attribute->id : 0;

	if ( $args['id'] && empty( $args['name'] ) ) {
		$args['name'] = $attribute->name;
	}

	$args['old_slug'] = $wpdb->get_var(
		$wpdb->prepare(
			"
				SELECT attribute_name
				FROM {$wpdb->prefix}woocommerce_attribute_taxonomies
				WHERE attribute_id = %d
			",
			$args['id']
		)
	);

	return wc_create_attribute( $args );
}