# learnpress/4.4.9/assets/js/dist/admin/pages/setup.js

LearnPress – WordPress LMS Plugin for Create and Sell Online Courses, version 4.4.9. 49 lines.

- Page: https://pluginprobe.com/plugins/learnpress/4.4.9/code/assets/js/dist/admin/pages/setup.js
- Raw: https://pluginprobe.com/plugins/learnpress/4.4.9/raw/assets/js/dist/admin/pages/setup.js
- Modified: 2026-09-27T10:32:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/learnpress/4.4.9/code/assets/js/dist/admin/pages/setup.js#L10-L20`.

```javascript
/******/ (() => { // webpackBootstrap
/*!*************************************************!*\
  !*** ./assets/src/apps/js/admin/pages/setup.js ***!
  \*************************************************/
/**
 * Setup Wizard Script
 *
 * @since 4.2.8.6
 */
class SetupWizard {
  static selectors = {
    elSetupForm: '#learn-press-setup-form',
    elPreviewPrice: '#preview-price'
  };
  init() {
    this.elSetupForm = document.querySelector(SetupWizard.selectors.elSetupForm);
    if (!this.elSetupForm) {
      return;
    }
    this.events();
  }
  events() {
    document.addEventListener('change', e => {
      if (e.target.closest('input, select')) {
        this.saveSettings();
      }
    });
  }

  /* Post form data to current url, update preview price html with response */
  saveSettings() {
    const formData = new FormData(this.elSetupForm);
    fetch(window.location.href, {
      method: 'POST',
      body: formData
    }).then(response => response.text()).then(html => {
      const elPreviewPrice = document.querySelector(SetupWizard.selectors.elPreviewPrice);
      if (elPreviewPrice) {
        elPreviewPrice.innerHTML = html;
      }
    });
  }
}
document.addEventListener('DOMContentLoaded', () => {
  new SetupWizard().init();
});
/******/ })()
;
//# sourceMappingURL=setup.js.map
```
