-
Notifications
You must be signed in to change notification settings - Fork 10.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop Select2 in Backwards compatable manner #48731
base: trunk
Are you sure you want to change the base?
Conversation
Test using WordPress PlaygroundThe changes in this pull request can be previewed and tested using a WordPress Playground instance. Test this pull request with WordPress Playground. Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit. |
Size Change: 0 B Total Size: 2.5 MB |
Hi @jorgeatorres, @frosso, @coreymckrill, @claudiulodro, Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
Requested @jorgeatorres's review, and he already has some context on it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this looks good to me @naman03malhotra. Thanks for working on this!
In the admin, we're still registering a select2
script, which we could also point to selectWoo
. It should be safer to even remove it entirely, but I guess there might be extensions out there relying on this for whatever reason.
wp_register_script( 'select2', WC()->plugin_url() . '/assets/js/select2/select2.full' . $suffix . '.js', array( 'jquery' ), '4.0.3' ); |
Good catch @jorgeatorres, I've made the change, also I've kept the version same to avoid duplicate downloads with different hashes.
Yep, maybe we can plan a depreciation path for this, but it is safe to have this namespace exposed. |
Submission Review Guidelines:
Changes proposed in this Pull Request:
Closes #48577
Given that Select2 and SelectWoo have the same APIs, this PR points the registry of the Select2 library to SelectWoo.
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
Please test it with the following instructions:
\wp-admin > advanced > Webhooks
pagewc-enchanced-select.js
replace.selectWoo
with.select2
every where in the file.select2
by going tobrowser console > sources > cmd + p > search for wc-enhanced-select.js > verify if it has select2
.\wp-admin > advanced > Webhooks
pageChangelog entry
Changelog Entry Details
Significance
Type
Message
Changelog Entry Comment
Comment