Automattic\WooCommerce\Blocks\Templates
SingleProductTemplateCompatibility::update_render_block_data
Update the render block data to inject our custom attribute needed to determine which is the first block of the Single Product Template.
Method of the class: SingleProductTemplateCompatibility{}
No Hooks.
Returns
Array.
Usage
$SingleProductTemplateCompatibility = new SingleProductTemplateCompatibility(); $SingleProductTemplateCompatibility->update_render_block_data( $parsed_block, $source_block, $parent_block );
- $parsed_block(array) (required)
- The block being rendered.
- $source_block(array) (required)
- An un-modified copy of
$parsed_block, as it appeared in the source content. - $parent_block(WP_Block|null) (required)
- If this is a nested block, a reference to the parent block.
SingleProductTemplateCompatibility::update_render_block_data() SingleProductTemplateCompatibility::update render block data code WC 10.5.0
public function update_render_block_data( $parsed_block, $source_block, $parent_block ) {
return $parsed_block;
}