WC_API_Products::set_product_category_image_as_attachment()protectedWC 2.5.0

Sets uploaded category image as attachment and returns the attachment ID.

Method of the class: WC_API_Products{}

No Hooks.

Return

Int. Attachment ID

Usage

// protected - for code of main (parent) or child class
$result = $this->set_product_category_image_as_attachment( $upload );
$upload(int) (required)
Upload information from wp_upload_bits

Changelog

Since 2.5.0 Introduced.

WC_API_Products::set_product_category_image_as_attachment() code WC 8.9.0

protected function set_product_category_image_as_attachment( $upload ) {
	return $this->set_uploaded_image_as_attachment( $upload );
}