code = wc_format_coupon_code($code); $this->ruleId = $ruleId; } public function equals(AdpCouponInterface $coupon): bool { if (!$coupon instanceof WcCouponCart) { return false; } return $this->code === $coupon->getCode() && $this->ruleId === $coupon->getRuleId(); } /** * @param string $code */ public function setCode($code) { return; } /** * @return string */ public function getCode() { return $this->code; } /** * @param float $value */ public function setValue($value) { } /** * @return float */ public function getValue() { return 0.0; } /** * @return int */ public function getRuleId() { return $this->ruleId; } /** * @param string $label */ public function setLabel($label) { } /** * @return string */ public function getLabel() { return $this->code; } public function setMaxDiscount($amount) { } public function getMaxDiscount() { return 0.0; } public function isMaxDiscountDefined() { return false; } }