WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

Automattic\WooCommerce\Blocks

Library::register_blocks() public WC 1.0

Register blocks, hooking up assets and render functions as needed.

{} Это метод класса: Library{}

Хуков нет.

Возвращает

Null. Ничего.

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

$result = Library::register_blocks();

Код Library::register_blocks() WC 4.7.1

<?php
public static function register_blocks() {
	global $wp_version;
	$blocks = [
		'AllReviews',
		'FeaturedCategory',
		'FeaturedProduct',
		'HandpickedProducts',
		'ProductBestSellers',
		'ProductCategories',
		'ProductCategory',
		'ProductNew',
		'ProductOnSale',
		'ProductsByAttribute',
		'ProductTopRated',
		'ReviewsByProduct',
		'ReviewsByCategory',
		'ProductSearch',
		'ProductTag',
	];
	// Note: as a part of refactoring dynamic block registration, this will be moved
	// to block level config.
	if ( version_compare( $wp_version, '5.3', '>=' ) ) {
		$blocks[] = 'AllProducts';
		$blocks[] = 'PriceFilter';
		$blocks[] = 'AttributeFilter';
		$blocks[] = 'ActiveFilters';

		if ( Package::is_feature_plugin_build() ) {
			$blocks[] = 'Checkout';
			$blocks[] = 'Cart';
		}
	}
	if ( Package::is_experimental_build() ) {
		$blocks[] = 'SingleProduct';
	}
	foreach ( $blocks as $class ) {
		$class    = __NAMESPACE__ . '\\BlockTypes\\' . $class;
		$instance = new $class();
		$instance->register_block_type();
	}
	self::register_atomic_blocks();
}