Automattic\WooCommerce\Admin\Features\ProductBlockEditor
Init::register_layout_templates()
Register layout templates.
Метод класса: Init{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Init = new Init(); $Init->register_layout_templates();
Код Init::register_layout_templates() Init::register layout templates WC 9.7.1
public function register_layout_templates() { $layout_template_registry = wc_get_container()->get( LayoutTemplateRegistry::class ); if ( ! $layout_template_registry->is_registered( 'simple-product' ) ) { $layout_template_registry->register( 'simple-product', 'product-form', SimpleProductTemplate::class ); } if ( ! $layout_template_registry->is_registered( 'product-variation' ) ) { $layout_template_registry->register( 'product-variation', 'product-form', ProductVariationTemplate::class ); } }