Automattic\WooCommerce\Internal\Admin\BlockTemplates

AbstractBlockTemplate::get_blockpublicWC 1.0

Get a block by ID.

Method of the class: AbstractBlockTemplate{}

No Hooks.

Returns

null. Nothing (null).

Usage

$AbstractBlockTemplate = new AbstractBlockTemplate();
$AbstractBlockTemplate->get_block( $block_id ): ?BlockInterface;
$block_id(string) (required)
The block ID.

AbstractBlockTemplate::get_block() code WC 10.8.1

public function get_block( string $block_id ): ?BlockInterface {
	return $this->block_cache[ $block_id ] ?? null;
}