Skip to content

Commit

Permalink
Remove overriden getDescription() and use parent function directly
Browse files Browse the repository at this point in the history
  • Loading branch information
iainheng committed Aug 6, 2020
1 parent 719bf02 commit 49ecb25
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/Coupons/BuyXGetYCoupon.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,20 +289,20 @@ public function toArray()
return $data;
}

/**
* @param array $options
* @return string
*/
public function getDescription(Cart $cart = null, $options = [])
{
$str = parent::getDescription($cart, $options) . ' for ' . $this->discountable->getDiscountableDescription();

if ($this->applyOnce) {
$str .= ' (once per order)';
}

return $str;
}
// /**
// * @param array $options
// * @return string
// */
// public function getDescription(Cart $cart = null, $options = [])
// {
// $str = parent::getDescription($cart, $options) . ' for ' . $this->discountable->getDiscountableDescription();
//
// if ($this->applyOnce) {
// $str .= ' (once per order)';
// }
//
// return $str;
// }

/**
* Get list of cart items that are eligible for discount
Expand Down

0 comments on commit 49ecb25

Please sign in to comment.