You are here

public function Coupon::getCode in Commerce Core 8.2

Gets the coupon code.

Return value

string Code for the coupon.

Overrides CouponInterface::getCode

File

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

Class

Coupon
Defines the Coupon entity.

Namespace

Drupal\commerce_promotion\Entity

Code

public function getCode() {
  return $this
    ->get('code')->value;
}