Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplates
GroupInterface{}└─ BlockContainerInterface
Interface for group containers, which contain sections and blocks.
Хуков нет.
Использование
$GroupInterface = new GroupInterface(); // use class methods
Методы
Код GroupInterface{} GroupInterface{} WC 10.4.3
interface GroupInterface extends BlockContainerInterface {
/**
* Adds a new section to the group
*
* @param array $block_config block config.
* @return SectionInterface new block section.
*/
public function add_section( array $block_config ): SectionInterface;
/**
* Adds a new block to the group.
*
* @param array $block_config block config.
*/
public function add_block( array $block_config ): BlockInterface;
}