Automattic\WooCommerce\RestApi\Utilities
ImageAttachment::update_name()
Update attachment name.
Method of the class: ImageAttachment{}
No Hooks.
Return
null
. Nothing (null).
Usage
$ImageAttachment = new ImageAttachment(); $ImageAttachment->update_name( $text );
- $text(string) (required)
- Text to set.
ImageAttachment::update_name() ImageAttachment::update name code WC 9.5.1
public function update_name( $text ) { if ( ! $this->id ) { return; } wp_update_post( array( 'ID' => $this->id, 'post_title' => $text, ) ); }