Automattic\WooCommerce\Admin\Features\ProductBlockEditor

Init::register_layout_templates()publicWC 1.0

Register layout templates.

Method of the class: Init{}

No Hooks.

Return

null. Nothing (null).

Usage

$Init = new Init();
$Init->register_layout_templates();

Init::register_layout_templates() code WC 9.0.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
		);
	}
}