Automattic\WooCommerce\Blocks\BlockTypes

MiniCartContents::renderprotectedWC 1.0

Render the markup for the Mini-Cart Contents block.

Method of the class: MiniCartContents{}

No Hooks.

Returns

String. Rendered block type output.

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.

MiniCartContents::render() code 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;
}