Automattic\WooCommerce\Blocks\BlockTypes

FeaturedCategory::get_item_image_id │ protected │ WC 1.0

Returns the featured category image attachment ID.

Method of the class: FeaturedCategory{}

No Hooks.

Returns

int.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_item_image_id( $category );
$category(WP_Term) (required)
Term object.

FeaturedCategory::get_item_image_id() code WC 11.1.2

protected function get_item_image_id( $category ) {
	return (int) get_term_meta( $category->term_id, 'thumbnail_id', true );
}