WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

Automattic\WooCommerce\Blocks\Registry

Container::factory() public WC 1.0

Public api for adding a factory to the container.

Factory dependencies will have the instantiation callback invoked every time the dependency is requested.

Typical Usage:

$container->register( MyClass::class, $container->factory( $mycallback ) );

{} Это метод класса: Container{}

Хуков нет.

Возвращает

FactoryType. An instance of the FactoryType dependency.

Использование

$Container = new Container();
$Container->factory( $instantiation_callback );
$instantiation_callback(Closure) (обязательный)
This will be invoked when the dependency is required. It will receive an instance of this container so the callback can retrieve dependencies from the container.

Код Container::factory() WC 4.7.1

<?php
public function factory( Closure $instantiation_callback ) {
	return new FactoryType( $instantiation_callback );
}