WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\RestApi\Utilities

ImageAttachment::update_name() public WC 1.0

Update attachment name.

{} It's a method of the class: ImageAttachment{}

No Hooks.

Return

null. Nothing.

Usage

$ImageAttachment = new ImageAttachment();
$ImageAttachment->update_name( $text );
$text(string) (required)
Text to set.

Code of ImageAttachment::update_name() WC 5.6.0

public function update_name( $text ) {
	if ( ! $this->id ) {
		return;
	}
	wp_update_post(
		array(
			'ID'         => $this->id,
			'post_title' => $text,
		)
	);
}