Automattic\WooCommerce\Internal\CLI\Migrator\Commands
ProductsCommand::init
Initialize the command with its dependencies.
Метод класса: ProductsCommand{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$ProductsCommand = new ProductsCommand(); $ProductsCommand->init( $credential_manager, $platform_registry, $products_controller ): void;
- $credential_manager(CredentialManager) (обязательный)
- The credential manager.
- $platform_registry(PlatformRegistry) (обязательный)
- The platform registry.
- $products_controller(ProductsController) (обязательный)
- The products controller.
Код ProductsCommand::init() ProductsCommand::init WC 11.3.0
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;
}