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