Using Enterprise, I need to get the expiration date of the coupon (the expiration date of the cart rule schedule). The problem is that when saving the schedule, this date is not saved in either the “salesrule” table or in “salesrule_coupon”. All the fields of the “to_date” column appear empty. Has anyone had to deal with this? Maybe something else is needed for the data to be saved there?
$rule = $this->ruleRepository->getById($ruleId);
$expirationDateRule = $rule->getToDate();
$expirationDateRule gave me null