Automattic\WooCommerce\Internal\CLI\Migrator\Commands

ProductsCommand::initpublicWC 1.0

Initialize the command with its dependencies.

Method of the class: ProductsCommand{}

No Hooks.

Returns

null. Nothing (null).

Usage

$ProductsCommand = new ProductsCommand();
$ProductsCommand->init( $credential_manager, $platform_registry, $products_controller ): void;
$credential_manager(CredentialManager) (required)
The credential manager.
$platform_registry(PlatformRegistry) (required)
The platform registry.
$products_controller(ProductsController) (required)
The products controller.

ProductsCommand::init() code WC 10.9.4

final public function init( CredentialManager $credential_manager, PlatformRegistry $platform_registry, ProductsController $products_controller ): void { // phpcs:ignore Generic.CodeAnalysis.UnnecessaryFinalModifier.Found -- Required by WooCommerce injection method rules
	$this->credential_manager  = $credential_manager;
	$this->platform_registry   = $platform_registry;
	$this->products_controller = $products_controller;
}