Automattic\WooCommerce\Blocks\BlockTypes
MiniCartContents::render
Render the markup for the Mini-Cart Contents block.
Метод класса: MiniCartContents{}
Хуков нет.
Возвращает
Строку
. Rendered block type output.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->render( $attributes, $content, $block );
- $attributes(массив) (обязательный)
- Block attributes.
- $content(строка) (обязательный)
- Block content.
- $block(WP_Block) (обязательный)
- Block instance.
Код MiniCartContents::render() MiniCartContents::render WC 9.9.4
protected function render( $attributes, $content, $block ) { if ( is_admin() || WC()->is_rest_api_request() ) { // In the editor we will display the placeholder, so no need to // print the markup. return ''; } return $content; }