- Issue created by @coffeemakr
The CouponStorageInterface
defines the return type of the method loadEnabledByCode
as CouponInterface
, but the method returns FALSE
if no such code is found.
I would return NULL, if no coupon is found (like EntityStorageInterface::load()
) and change the return type to
* @return \Drupal\commerce_promotion\Entity\CouponInterface|null
.
Active
2.0
Promotions