Automattic\WooCommerce\Blocks\BlockTypes
FeaturedCategory::render
Render the selected category or the product category inherited from context.
Метод класса: FeaturedCategory{}
Хуков нет.
Возвращает
string.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->render( $attributes, $content, $block );
- $attributes(массив) (обязательный)
- Block attributes.
- $content(строка) (обязательный)
- Block content.
- $block(WP_Block) (обязательный)
- Block instance.
Список изменений
| С версии 11.2.0 | Введена. |
Код FeaturedCategory::render() FeaturedCategory::render WC 11.3.0
protected function render( $attributes, $content, $block ) {
$attributes['categoryId'] = self::resolve_category_id( $attributes, $block->context );
return parent::render( $attributes, $content, $block );
}