Automattic\WooCommerce\Blocks\BlockTypes
FeaturedCategory::render
Render the selected category or the product category inherited from context.
Method of the class: FeaturedCategory{}
No Hooks.
Returns
string.
Usage
// protected - for code of main (parent) or child class $result = $this->render( $attributes, $content, $block );
- $attributes(array) (required)
- Block attributes.
- $content(string) (required)
- Block content.
- $block(WP_Block) (required)
- Block instance.
Changelog
| Since 11.2.0 | Introduced. |
FeaturedCategory::render() FeaturedCategory::render code 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 );
}