Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplates
ProductFormTemplateInterface::get_block_by_id()
Gets Block by id.
Метод класса: ProductFormTemplateInterface{}
Хуков нет.
Возвращает
BlockInterface|null
.
Использование
$ProductFormTemplateInterface = new ProductFormTemplateInterface(); $ProductFormTemplateInterface->get_block_by_id( $block_id ): ?BlockInterface;
- $block_id(строка) (обязательный)
- block id.
Код ProductFormTemplateInterface::get_block_by_id() ProductFormTemplateInterface::get block by id WC 9.7.1
public function get_block_by_id( string $block_id ): ?BlockInterface;