Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplates

SubsectionInterface{}interfaceWC 1.0└─ BlockContainerInterface

Устарела с версии 10.9.0 Product editor extension APIs will be removed in WooCommerce 11.0.. Больше не поддерживается и может быть удалена. Рекомендуется заменить эту функцию на аналог.

Interface for subsection containers, which contain sub-sections and blocks.

Хуков нет.

Использование

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

Методы

  1. public add_block( array $block_config )

Список изменений

Устарела с 10.9.0 Product editor extension APIs will be removed in WooCommerce 11.0.

Код SubsectionInterface{} WC 10.9.4

interface SubsectionInterface extends BlockContainerInterface {
	/**
	 * Adds a new block to the sub-section.
	 *
	 * @param array $block_config block config.
	 */
	public function add_block( array $block_config ): BlockInterface;
}