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\EntityCode
public function setCode($code) {
$this
->set('code', $code);
return $this;
}