Automattic\WooCommerce\Admin\Features\ProductBlockEditor
Init::register_layout_templates()
Register layout templates.
Method of the class: Init{}
No Hooks.
Returns
null
. Nothing (null).
Usage
$Init = new Init(); $Init->register_layout_templates();
Init::register_layout_templates() Init::register layout templates code WC 9.8.4
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 ); } }