HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux bsx-1-dev 6.8.0-101-generic #101-Ubuntu SMP PREEMPT_DYNAMIC Mon Feb 9 10:15:05 UTC 2026 x86_64
User: www-data (33)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/memberpress/js/migrator.learndash.js
var MeprMigratorLearnDash = (function ($) {
  var migrator;

  migrator = {
    init: function () {
      $('#mepr-migrator-learndash-start').on('click', function () {
        var $progress = $('#mepr-migrator-learndash-user-progress'),
            onSuccess = function () {
              $progress.prop('disabled', false);
              $('#mepr-wizard-choose-content-search').triggerHandler('keyup'); // refresh existing content
              $('#mepr-wizard-ld-migrator').remove();
              $('#mepr-wizard-ld-migrator-success, #mepr-wizard-create-select-content').show();
              $('#mepr-wizard-content-nav-skip button').prop('disabled', false);
              $('#mepr-migrator-learndash-please-wait').hide();
            },
            onError = function () {
              $progress.prop('disabled', false);
              $('#mepr-wizard-cancel-ld-migrator').show();
              $('#mepr-wizard-content-nav-skip button').prop('disabled', false);
              $('#mepr-migrator-learndash-please-wait').hide();
            },
            data = {
              migrator: 'learndash',
              step: 'start',
              options: {
                userProgress: $progress.is(':checked')
              }
            };

        $progress.prop('disabled', true);
        $('#mepr-wizard-cancel-ld-migrator').hide();
        $('#mepr-wizard-content-nav-skip button').prop('disabled', true);
        $('#mepr-migrator-learndash-please-wait').fadeIn();

        MeprMigrator.start($(this), data, onSuccess, onError);
      });

      $('#mepr-wizard-cancel-ld-migrator').on('click', function () {
        $('#mepr-wizard-ld-migrator').remove();
        $('#mepr-wizard-create-select-content').show();
      });
    },
  };

  $(migrator.init);

  return migrator;
})(jQuery);