Automattic\WooCommerce\Blocks\BlockTypes
ProductDetails::initialize
Initialize the block type.
Метод класса: ProductDetails{}
Хуки из метода
Возвращает
null. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->initialize();
Код ProductDetails::initialize() ProductDetails::initialize WC 10.3.6
protected function initialize() {
parent::initialize();
/**
* Filter the blocks that are hooked into the Product Details block.
*
* @hook woocommerce_product_details_hooked_blocks
*
* @since 10.0.0
* @param {array} $hooked_blocks The blocks that are hooked into the Product Details block.
* @return {array} The blocks that are hooked into the Product Details block.
*/
$hooked_blocks = apply_filters( 'woocommerce_product_details_hooked_blocks', [] );
foreach ( $this->validate_hooked_blocks( $hooked_blocks ) as $slug => $block ) {
$this->register_hooked_block( $slug, $block );
}
}