Automattic\WooCommerce\Internal\Admin\BlockTemplates
AbstractBlockTemplate::get_formatted_template
Get the inner blocks as a formatted template.
Method of the class: AbstractBlockTemplate{}
No Hooks.
Returns
null. Nothing (null).
Usage
$AbstractBlockTemplate = new AbstractBlockTemplate(); $AbstractBlockTemplate->get_formatted_template(): array;
AbstractBlockTemplate::get_formatted_template() AbstractBlockTemplate::get formatted template code WC 10.8.1
public function get_formatted_template(): array {
$inner_blocks = $this->get_inner_blocks_sorted_by_order();
$inner_blocks_formatted_template = array_map(
function( BlockInterface $block ) {
return $block->get_formatted_template();
},
$inner_blocks
);
return $inner_blocks_formatted_template;
}