WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\RestApi\Utilities

ImageAttachment::update_alt_text() public WC 1.0

Update attachment alt text.

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

No Hooks.

Return

null. Nothing.

Usage

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

Code of ImageAttachment::update_alt_text() WC 5.6.0

public function update_alt_text( $text ) {
	if ( ! $this->id ) {
		return;
	}
	update_post_meta( $this->id, '_wp_attachment_image_alt', wc_clean( $text ) );
}