• Resolved BackuPs

    (@neo2k23)


    console.trace() JQMIGRATE: jQuery.isArray() is removed; use Array.isArray() jquery-migrate-4.0.0-beta.1.js:142:13

        jQuery 3

        apply http://server.tst/wp-content/plugins/woocommerce/assets/js/select2/select2.full.js?ver=4.0.3:4756

        Options http://server.tst/wp-content/plugins/woocommerce/assets/js/select2/select2.full.js?ver=4.0.3:4919

        Select2 http://server.tst/wp-content/plugins/woocommerce/assets/js/select2/select2.full.js?ver=4.0.3:5046

        select2 http://server.tst/wp-content/plugins/woocommerce/assets/js/select2/select2.full.js?ver=4.0.3:6378

        jQuery 2

        select2 http://server.tst/wp-content/plugins/woocommerce/assets/js/select2/select2.full.js?ver=4.0.3:6375

    I am getting above warning message in the js error console using js debug and Test Jquery Updates Plugin.

    i is caused by line 4756 in wp-content/plugins/woocommerce/assets/js/select2/select2.full.js
    which has this code if ($.isArray(options.language)) {…}

    Please fix.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    I understand how frustrating this can be. Let me clarify. This is not a WooCommerce or PHP error by itself. What you’re seeing is a JavaScript stack trace related to Select2, which is the library WooCommerce uses for dropdown fields (such as country, state, and product selectors).

    The lines shown (apply, Options, Select2, select2) indicate where the JavaScript failed while initializing or updating a Select2 field. What this usually indicates

    In most cases, this happens due to:

    • A JavaScript conflict with another plugin or the active theme
    • A plugin re-initializing Select2 on a field that WooCommerce has already initialized
    • A plugin or custom code modifying checkout fields in a way that breaks Select2
    • Fields being added via AJAX without properly triggering Select2 again

    For testing purposes, could you please deactivate all plugins except WooCommerce, switch to a default theme like Storefront, and then check whether you’re still experiencing the same issue?

    Thread Starter BackuPs

    (@neo2k23)

    This happens because woocommerce is using a outdated select2 script v 4.0.3. There is no js conflict, ajax, plugin or whatever breaking select2.

    This is happening because the select2.js woocommerce ships is using $.isArray which has been deprecated in JQuery for a long time.

    I kindly request you to dive into this matter and submit this to the woocommerce developers. The default answer given above is incorrect and not applicable at all. It is a deprecation bug. Please drop at the developers table

    Note: the $.isArray function is used multiple times in the js file woocommerce ships for select2 and select2.full

    I am just informing you that in Jquery 4.0 the support is stopped. for isArray. It is up to you to take actions on this.

    Another thing to consider : the reason plugins also run into this error/warning is because woocommerce is loading select2 in every admin screen in the admin area. Also in plugin settings screens or theme settings screens where this should not be loaded at all. Woocommerce should only load select2 in its own settings and product related admin screens which will cause no issue with plugins and admin ajax in other areas.

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Sorry for the confusion. I’ve checked this and I can also confirm that $.isArray is present at line 4756 in the select2.full.js file. Thank you for bringing this to our attention. I will pass this on to our developers so they can review it and plan to update it in a future release.

    Thread Starter BackuPs

    (@neo2k23)

    It is present at many lines in that file and also in select.js not only select2.full.js

    Please add that to the message you send at the developers

    Thank you.

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Thank you for providing the additional information. I’ll make sure to share the link to this thread with the developers so they can see all the details and suggestions you’ve provided. We really appreciate you taking the time to help us improve WooCommerce.

    Plugin Support Ejay F – a11n

    (@ejayfernandes)

    Hi @neo2k23,

    I hope all is well. As we haven’t heard back from you, I’ll close this out for now. Please don’t hesitate to reach out if you need help again in the future.

    If our support was helpful, we’d appreciate it if you could share your experience here:
    https://wordpress.org/support/plugin/woocommerce/reviews/#new-post

    Thread Starter BackuPs

    (@neo2k23)

    @ejayfernandes huh? was there a question left that i needed to answer? I thought you would get back to me with a reply that “the issue is fixed”. I am not aware that i needed to provide additional information as everything that needed to be said was explained and clear from the outset.

    Can you please provide more details about what additional information i need to provide so the problem gets fixed?

    Thank you

    Plugin Support LovingBro (woo-hc)

    (@lovingbro)

    Hi @neo2k23,

    I appreciate you following up and I can see how the earlier message caused some confusion. I want to clarify what happened and make sure we are aligned.

    The message you received earlier is a follow up that is sent to all threads that are not marked as resolved and have had no activity for more than 7 days. It was not a request for additional information specific to your case.

    As my colleague already confirmed that your findings and suggestions were shared with the developers, the thread should have been marked as resolved at that point. No further details are required from you, and the topic is now correctly marked as resolved.

    Thank you again for taking the time to report this and for providing such thorough technical context. It is genuinely helpful for improving WooCommerce.

    Plugin Support thelmachido a11n

    (@thelmachido)

    Hi @neo2k23 thank you for your patience on this one, we are sorry we resolved this issue previously, but please rest assured we continued to check on this.

    You were spot on that $.isArray is deprecated in jQuery 4.0 and that the select2 library is the source of the warning. However, our internal audit found a very specific nuance in how WooCommerce handles this.

    While WooCommerce historically used select2, the core code has transitioned to wc-select. The reason you are still seeing this notice across all admin pages is due to a “policed” check: WooCommerce currently scans to see if other active plugins or themes are still using the older select2 library to prevent conflicts.

    Because this check runs broadly across the admin area, it triggers the JQMIGRATE warning on every page load, even if the page isn’t actively using a dropdown at that moment.Tracking the Fix

    We have a formal issue open on GitHub specifically to address this deprecation and refine how we handle these library checks so they don’t clutter your console.

    You can follow the progress and read the developer notes here:

    👉 GitHub Issue: jQuery Deprecation Notices in Admin

    I recommend keeping an eye on that thread for the specific version release where this is optimized. We really appreciate the thorough technical context you provided—it helps us ensure the transition to jQuery 4.0 is as seamless as possible for everyone.

Viewing 9 replies - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.