1. Home
  2. Knowledge Base
  3. Uncanny LearnDash Toolkit Pro
  4. Days Until Course Expiry

Overview

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 in this module lets you show the number of days until expiry instead.

Shortcode

[uo_expiration_in]

Just add this shortcode to any page inside a LearnDash course (including a sidebar) and the number of days until expiry is listed.

Attributes

Adding the shortcode 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. 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 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 is displayed on a course page of a closed course, for example).

Was this article helpful?