You are here

public function AlwaysInStock::getIsInStock in Commerce Stock 8

Check if purchasable entity is in stock.

Parameters

\Drupal\commerce\PurchasableEntityInterface $entity: The purchasable entity.

\Drupal\commerce_stock\StockLocationInterface[] $locations: The locations to check against.

Return value

bool TRUE if the entity is in stock, FALSE otherwise.

Overrides StockCheckInterface::getIsInStock

File

src/AlwaysInStock.php, line 33

Class

AlwaysInStock
The Checker and updater implementation for the always in stock service.

Namespace

Drupal\commerce_stock

Code

public function getIsInStock(PurchasableEntityInterface $entity, array $locations) {
  return TRUE;
}