paid-memberships-pro icon indicating copy to clipboard operation
paid-memberships-pro copied to clipboard

PMPRO is aggressively loading its own version of select2 on ALL admin pages

Open zagarskas opened this issue 11 months ago • 3 comments

Describe the bug Very simple: PMPRO is aggressively loading its own version of select2 on ALL admin pages.

This creates problems. There are other plugins and themes out there using PRE 4.0 select2, and the newest select2 4.1.1 - a conflict then ensues.

To Reproduce Steps to reproduce the behavior:

  1. install PMPRO
  2. write custom code for your own theme or plugin that uses another version of select2
  3. watch the PMPRO version of select2 load into the page and cause issues

Screenshots src="/wp-content/plugins/paid-memberships-pro/js/pmpro-admin.js" image

Expected behavior this ambiguous handle: "select2-js" would better be "pmpro_admin-select2-js" so we can identify and dequeue it. Also ideal: not loading PMPRO's version of select2 on every wp-admin page would be courteous

consider that some of us are using this: Select2 4.1.1-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md and have modified the core to patch this issue -- Added non-passive event listener to a scroll-blocking event. https://github.com/angular/components/issues/4221

Isolating the problem (mark completed items with an [x]):

  • [ ] I have deactivated other plugins and confirmed this bug occurs when only Paid Memberships Pro plugin is active. meh... not really. because that would make the "bug" disappear

  • [ ] This bug happens with a default WordPress theme active, or Memberlite. meh... not a fair request in this case

  • [x] I can reproduce this bug consistently using the steps above.

WordPress Environment

``` n/a ```

zagarskas avatar Mar 23 '24 00:03 zagarskas