setAvailability example

$product->getFullConfiguration()
                )
            );

            if (\array_key_exists($product->getNumber()$listingPrices)) {
                $product->setListingVariationPrices(
                    $listingPrices[$product->getNumber()]
                );
            }

            if (\array_key_exists($number$availability)) {
                $product->setAvailability($availability[$number]);
            }
        }
    }

    private function formatDate(?DateTimeInterface $date = null): ?string
    {
        return !$date ? null : $date->format('Y-m-d');
    }

    /** * @param ListProduct[] $products * * @return array[] */
Home | Imprint | This part of the site doesn't use cookies.