Automattic\WooCommerce\RestApi\Utilities
ImageAttachment::update_name()
Update attachment name.
Метод класса: ImageAttachment{}
Хуков нет.
Возвращает
null
. Ничего.
Использование
$ImageAttachment = new ImageAttachment(); $ImageAttachment->update_name( $text );
- $text(строка) (обязательный)
- Text to set.
Код ImageAttachment::update_name() ImageAttachment::update name WC 7.5.1
public function update_name( $text ) { if ( ! $this->id ) { return; } wp_update_post( array( 'ID' => $this->id, 'post_title' => $text, ) ); }