Automattic\WooCommerce\Internal\Admin\BlockTemplates
AbstractBlockTemplate::get_block
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() AbstractBlockTemplate::get block code WC 10.8.1
public function get_block( string $block_id ): ?BlockInterface {
return $this->block_cache[ $block_id ] ?? null;
}