Automattic\WooCommerce\Api\Mutations\Products
CreateProduct::init
Inject dependencies via the DI container.
Method of the class: CreateProduct{}
No Hooks.
Returns
null. Nothing (null).
Usage
$CreateProduct = new CreateProduct(); $CreateProduct->init( $repository ): void;
- $repository(ProductRepository) (required)
- The product repository.
CreateProduct::init() CreateProduct::init code WC 11.0.1
final public function init( ProductRepository $repository ): void {
$this->repository = $repository;
}