Automattic\WooCommerce\Internal\ComingSoon
ComingSoonRequestHandler::possibly_init_block_templates()
Initializes block templates so we can show coming soon page in non-FSE themes.
Метод класса: ComingSoonRequestHandler{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$ComingSoonRequestHandler = new ComingSoonRequestHandler(); $ComingSoonRequestHandler->possibly_init_block_templates();
Код ComingSoonRequestHandler::possibly_init_block_templates() ComingSoonRequestHandler::possibly init block templates WC 9.8.1
public function possibly_init_block_templates() { // No need to initialize block templates since we've already initialized them in the Block Bootstrap. if ( wc_current_theme_is_fse_theme() || current_theme_supports( 'block-template-parts' ) ) { return; } $container = BlocksPackage::container(); $container->get( BlockTemplatesRegistry::class )->init(); $container->get( BlockTemplatesController::class )->init(); }