Automattic\WooCommerce\Internal\CLI\Migrator\Core

ProductsController::initpublicWC 1.0

Initialize the controller with its dependencies. Called automatically by the WooCommerce DI container.

Method of the class: ProductsController{}

No Hooks.

Returns

null. Nothing (null).

Usage

$ProductsController = new ProductsController();
$ProductsController->init( $credential_manager, $platform_registry, $product_importer, $tracker ): void;
$credential_manager(CredentialManager) (required)
The credential manager.
$platform_registry(PlatformRegistry) (required)
The platform registry.
$product_importer(WooCommerceProductImporter) (required)
The product importer.
$tracker(MigratorTracker) (required)
The migration tracker.

ProductsController::init() code WC 10.7.0

final public function init(
	CredentialManager $credential_manager,
	PlatformRegistry $platform_registry,
	WooCommerceProductImporter $product_importer,
	MigratorTracker $tracker
): void {
	$this->credential_manager = $credential_manager;
	$this->platform_registry  = $platform_registry;
	$this->product_importer   = $product_importer;
	$this->tracker            = $tracker;
}