| Server IP : 51.91.236.193 / Your IP : 216.73.216.224 Web Server : Apache System : Linux webm010.cluster128.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : institutah ( 16501) PHP Version : 7.2.34 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/institutah/www/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/ |
Upload File : |
<?php
/**
* Initializes blocks in WordPress.
*
* @package WooCommerce/Blocks
*/
namespace Automattic\WooCommerce\Blocks;
defined( 'ABSPATH' ) || exit;
/**
* Library class.
*/
class Library {
/**
* Initialize block library features.
*/
public static function init() {
add_action( 'init', array( __CLASS__, 'register_blocks' ) );
}
/**
* Register blocks, hooking up assets and render functions as needed.
*/
public static function register_blocks() {
$blocks = [
'FeaturedCategory',
'FeaturedProduct',
'HandpickedProducts',
'ProductBestSellers',
'ProductCategories',
'ProductCategory',
'ProductNew',
'ProductOnSale',
'ProductsByAttribute',
'ProductTopRated',
'ProductTag',
];
foreach ( $blocks as $class ) {
$class = __NAMESPACE__ . '\\BlockTypes\\' . $class;
$instance = new $class();
$instance->register_block_type();
}
}
}