public function StockTransactionsInterface::moveStock in Commerce Stock 8
Move stock.
Parameters
\Drupal\commerce\PurchasableEntityInterface $entity: The purchasable entity (most likely a product variation entity).
int $from_location_id: The source location ID.
int $to_location_id: The target location ID.
string $from_zone: The source zone.
string $to_zone: The target zone.
float $quantity: The quantity.
float $unit_cost: The unit cost.
string $currency_code: The currency code.
string $message: The message.
1 method overrides StockTransactionsInterface::moveStock()
- StockServiceManager::moveStock in src/
StockServiceManager.php - Move stock.
File
- src/
StockTransactionsInterface.php, line 156
Class
- StockTransactionsInterface
- Defines a common interface for creating stock transactions.
Namespace
Drupal\commerce_stockCode
public function moveStock(PurchasableEntityInterface $entity, $from_location_id, $to_location_id, $from_zone, $to_zone, $quantity, $unit_cost, $currency_code, $message = NULL);