Automattic\WooCommerce\Internal\Admin\BlockTemplates
BlockTemplate::add_block()
Add an inner block to this template.
Method of the class: BlockTemplate{}
No Hooks.
Return
null
. Nothing (null).
Usage
$BlockTemplate = new BlockTemplate(); $BlockTemplate->add_block( $block_config ): BlockInterface;
- $block_config(array) (required)
- The block data.
BlockTemplate::add_block() BlockTemplate::add block code WC 9.3.3
public function add_block( array $block_config ): BlockInterface { $block = new Block( $block_config, $this->get_root_template(), $this ); return $this->add_inner_block( $block ); }