License Key Registration

License Keys generate "magic url"s that allow a learner to "register" and "add their license key" all in one URL click.

During install, Bright creates a custom registration page [typically just called register]

On this page will be the shortcode

[bright_woocommerce_registration_form]

as of this document's writing this resolves to:

function woocommerce_registration_form($attributes) {
  if (is_user_logged_in() && isset($_GET['redirect_to'])) {
    $url = $_GET['redirect_to'];
    if (headers_sent()) {
      echo('Redirecting you .... if you are not redirected after a few seconds click <a href="' . $url . '">here</a>.');
      echo("<script>location.href = '". $_GET['redirect_to'] ."'</script>");
    } else
      wp_safe_redirect($_GET['redirect_to']); 
  } else
    echo do_shortcode('[woocommerce_simple_registration]');
}