Automattic\WooCommerce\Admin\Features\ProductBlockEditor

BlockRegistry::register_product_blocks()privateWC 1.0

Register all the product blocks.

Method of the class: BlockRegistry{}

No Hooks.

Return

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->register_product_blocks();

BlockRegistry::register_product_blocks() code WC 9.2.3

private function register_product_blocks() {
	foreach ( self::PRODUCT_FIELDS_BLOCKS as $block_name ) {
		$this->register_block( $block_name, self::PRODUCT_FIELDS_BLOCKS_DIR );
	}
	foreach ( self::GENERIC_BLOCKS as $block_name ) {
		$this->register_block( $block_name, self::GENERIC_BLOCKS_DIR );
	}
}