Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplates

GroupInterface{}interfaceWC 1.0└─ BlockContainerInterface

Deprecated since 10.9.0 Product editor extension APIs will be removed in WooCommerce 11.0.. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.

Interface for group containers, which contain sections and blocks.

No Hooks.

Usage

$GroupInterface = new GroupInterface();
// use class methods

Methods

  1. public add_block( array $block_config )
  2. public add_section( array $block_config )

Changelog

Deprecated since 10.9.0 Product editor extension APIs will be removed in WooCommerce 11.0.

GroupInterface{} code WC 10.9.4

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;
}