WC_API_Products::set_product_category_image_as_attachment()
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() WC API Products::set product category image as attachment code WC 7.7.0
protected function set_product_category_image_as_attachment( $upload ) { return $this->set_uploaded_image_as_attachment( $upload ); }