Automattic\WooCommerce\Blocks\BlockTypes

FeaturedItem::get_item_image_id │ protected │ WC 1.0

Returns the featured item image attachment ID.

Note: Ideally, this method would be declared as abstract. However, it remains a concrete method returning 0 to preserve legacy compatibility with existing child classes that may not implement it. See: https://github.com/woocommerce/woocommerce/pull/66466#discussion_r3559124282

Method of the class: FeaturedItem{}

No Hooks.

Returns

int.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_item_image_id( $item );
$item(WP_Term|\WC_Product) (required)
Item object.

FeaturedItem::get_item_image_id() code WC 11.1.2

protected function get_item_image_id( $item ) {
	return 0;
}