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

Метод класса: FeaturedItem{}

Хуков нет.

Возвращает

int.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_item_image_id( $item );
$item(WP_Term|\WC_Product) (обязательный)
Item object.

Код FeaturedItem::get_item_image_id() WC 11.3.0

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