The Days Until Course Expiry module is part of the Pro Suite of modules for the Uncanny LearnDash Toolkit. Out of the box, LearnDash includes a shortcode that shows the date on which access to a course expires for a learner. The shortcode/block in this module lets you show the number of days until expiry instead.
Block Name: Days Until Course Expiry
Just add this shortcode/block to any page inside a LearnDash course (including a sidebar) and the number of days until expiry is listed.
To show the number of days until expiry on a non-course page, add a course-id attribute that includes the post ID of the associated course. Here’s an example, where “123” is the ID of the course:
Adding the shortcode/block alone adds the text “Course Access Expires in X days”, where X is the number of days until expiry. You can customize the message by including a pre-text attribute in the shortcode/block. For example:
[uo_expiration_in pre-text="Your access will expire in:"]
will change the text to “Your access will expire in: X days”. If you add the shortcode/block on a page or post not associated with a course, you must also include the course-id attribute to specify the course to which the expiration date applies.
Note: On the last day of access, the number of days will show “0”. If course access has expired, no text will be displayed (this is relevant when the shortcode/block is displayed on a course page of a closed course, for example).