parent = $parent; $this->product = $product; $this->price = $price; $this->qty = $qty; $this->pricedIndividually = $pricedIndividually; } public static function of( \WC_Product $parent, \WC_Product $product, float $price, float $qty, bool $pricedIndividually ): ContainerPartProduct { return new self($parent, $product, $price, $qty, $pricedIndividually); } public function getParent(): \WC_Product { return $this->parent; } public function getProduct(): \WC_Product { return $this->product; } /** * @return float */ public function getPrice(): float { return $this->price; } public function getQty(): float { return $this->qty; } /** * @return bool */ public function isPricedIndividually(): bool { return $this->pricedIndividually; } }