You are here

public function ProductVariation::setSku in Commerce Core 8.2

Set the variation SKU.

Parameters

string $sku: The variation SKU.

Return value

$this

Overrides ProductVariationInterface::setSku

File

modules/product/src/Entity/ProductVariation.php, line 166

Class

ProductVariation
Defines the product variation entity class.

Namespace

Drupal\commerce_product\Entity

Code

public function setSku($sku) {
  $this
    ->set('sku', $sku);
  return $this;
}