• When in the Admin section on WordPress 6.1.1, if I clicked on Appearance –> Customize to get to my theme’s customization page (for custom CSS, etc), the page wouldn’t load properly. I looked at the Console tab in the Developer Tools of my browser, and there were all sorts of jQuery related errors. After disabling and re-enabling all of my plugins one by one, the Customize page finally loaded up properly once I disabled the “Donation Block for PayPal” plugin.

    So, once I knew it was your plugin breaking this functionality, I looked at the wp_enqueue_script calls in your plugin, and I noticed that your plugin was enqueuing jQuery 3.6.0 when WordPress already loads jQuery v3.6.1 by default. Once I took those enqueue lines out of these files:

    admin/class-donations-block-admin.php
    public/class-donations-block-public.php

    Everything works again on the Customize page, and there are no more jQuery errors.

    Basically, I removed

    wp_enqueue_script( 'jQuery', plugin_dir_url( FILE ) . 'js/jquery.min.js','', $this->version, false );

    This isn’t needed and breaks things! Please fix your plugin. In the meantime, here is my fixed version:

    https://dinofly.com/files/wordpress/donations-block_wordpress_plugin_fixed_jquery_conflict.zip

  • The topic ‘Plugin Enqueue jQuery | Appearance –> Customize –> Empty Page’ is closed to new replies.