Automattic\WooCommerce\Blocks\BlockTypes
FeaturedItem::get_item_image_id
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() FeaturedItem::get item image id WC 11.3.0
protected function get_item_image_id( $item ) {
return 0;
}