1. Home
  2. Knowledge Base
  3. Uncanny Codes
  4. Standalone Code Redemption

Redemption Shortcode

Signed in users can redeem group or course codes from anywhere on a LearnDash site by using the Redemption shortcode or block. Adding this shortcode or block to a page will add a single text field that accepts the input of a code generated with the plugin. We generally use this on learner dashboard pages as an easy way to add additional access for a user.

Shortcode/Block

[uo_user_redeem_code redirect="" check_only="yes"]

Block Name: User Redeem Code

Redeem and remove access buttonsThe redirect attribute is optional; when provided, the user will be redirected to the specified URL upon successful code redemption.

The check_only attribute is also optional; when set to “yes”, the system will check to see whether or not a code is valid or redeemed and will not redeem it. It is only a check of the code’s current status. Codes will be confirmed as either invalid, redeemed, available or expired.

Access Removal Shortcode

To remove access, the plugin also includes a Access Removal shortcode. This shortcode adds a button that, when clicked, removes all access to courses and groups for the user. This button should be used very carefully.

Shortcode

[uo_self_remove_access]

Was this article helpful?

8 replies
  1. Bakhtiyar
    Bakhtiyar says:

    Hello!
    I am using standalone code redemption on each course that I have. Is it possible to show this shortcode only if user is not enrolled to course? And do not show it if user is allready enrolled to course.

    Reply
    • Ryan
      Ryan says:

      That’s interesting; it’s not something we’ve considered. Have you tried wrapping it in the LearnDash visitor shortcodes, making it only available to users that aren’t enrolled? If you use a CRM and control enrollment by tag you could also use a membership shortcode. Right now we’re not planning to add the capability on our side, unfortunately, as there are other ways to show/hide the form based on enrollment.

      Reply
  2. Marco
    Marco says:

    Hello!
    Is not very clear to me how to use a generated code to allow access only to one course.
    Is it right to:
    1) Create a closed course
    2) Generate the codes linked to that course

    Thanks for help!

    Reply
    • Ryan
      Ryan says:

      Yes, that’s correct. Created the closed course and generate the code for that course, then use the shortcode above so users have a way to redeem the code.

      Reply
    • Ryan
      Ryan says:

      For any plugin issues we really need a ticket to be submitted so we can track it and ask more details about your site.

      The form is definitely translatable though; if you use a translation plugin like Locotranslate is will pick up the translatable strings so that you can add new values.

      Reply
    • Ryan
      Ryan says:

      You should definitely file a ticket and let us know what plugins you’re using. What typically happens here is that someone is trying to redeem an enrollment key (from our Uncanny Groups plugin) or another plugin in this field. This field can only be used for codes generated by Uncanny Codes though. When you log the ticket maybe you can let us know how you’re creating the code. Thanks!

      Reply

Comments/Questions

Please note that this is not an official support channel and questions/comments may go unanswered.
To request support, log in to your account and click Submit a Request.

Leave a Reply

Your email address will not be published. Required fields are marked *