Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates
ProductBlock{}└─ ContainerInterface, AbstractBlock
Class for Product block.
No Hooks.
Usage
$ProductBlock = new ProductBlock(); // use class methods
Methods
ProductBlock{} ProductBlock{} code WC 10.7.0
class ProductBlock extends AbstractBlock implements ContainerInterface {
use BlockContainerTrait;
/**
* Adds block to the section block.
*
* @param array $block_config The block data.
*/
public function &add_block( array $block_config ): BlockInterface {
$block = new ProductBlock( $block_config, $this->get_root_template(), $this );
return $this->add_inner_block( $block );
}
}