You are here

public function Coupon::setCode in Commerce Core 8.2

Sets the coupon code.

Parameters

string $code: The coupon code.

Return value

$this

Overrides CouponInterface::setCode

File

modules/promotion/src/Entity/Coupon.php, line 99

Class

Coupon
Defines the Coupon entity.

Namespace

Drupal\commerce_promotion\Entity

Code

public function setCode($code) {
  $this
    ->set('code', $code);
  return $this;
}