[CoursePress Pro] Moving from one unit to a unit closed due to date restrictions shows no message

We have course with several units within the course. The first unit is available (based on dates). The next unit is not yet open due to its start date being in the future. When the course visitor gets to the end of unit 1 and hits next, then end up on the first page of the closed unit but no text explaining anything. They are offered only a Previous Unit button, with no text. It looks like:

Function module_status in include/shortcode/data/class-unit.php is called from function unit_with_modules in include/coursepress/template/class-unit.php for the course and correctly knows it’s not available, but does NOT know why. module_status returns no text because…

It calls:

CoursePress_Data_unit:get_unit_availability_status in include/coursepress/data/class-unit.php which correctly knows that the module is not available due to its due date, but does not set the return status: $status[‘date_restriction’] and $status[‘date_restriction’][‘result’] which module_status is relying upon. It gets the due_date, but doesn’t seem to set the array values based on that being the reason for the unit being unavailable.

As a result, no reason text is displayed – just the Previous button.


I will grant you access if you can look at it. It’s the course:

Chapter 1: TEST YOL

Which has 4 units. The first unit is open. The second is closed due to a start date.

Sep 16-29: Lesson 1 ‘ Lesson 1 Name’ is open

Oct 1-14: Lesson 2 ‘ Lesson 2 Name’ is not set to be available until October 2018.

When you click on next in the last unit section of Sep 16-29, you see the issue.