fix: selectWoo not initializing on layered nav dropdown widget#63275
Conversation
Testing GuidelinesHi , Apart from reviewing the code changes, please make sure to review the testing instructions (Guide) and verify that relevant tests (E2E, Unit, Integration, etc.) have been added or updated as needed. Reminder: PR reviewers are required to document testing performed. This includes:
|
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughAdded the SelectWoo dependency to the WooCommerce layered navigation dropdown widget script registration and added a changelog entry documenting the fix for SelectWoo initialization when using the OR query type. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Taking into consideration the very minimal change in the code base (literally just this dependency: https://github.com/woocommerce/woocommerce/pull/63275/changes#diff-9ef3168fc51f8172e2e2df63d7b86fcf7d02461406e25728e5930610bda8030dR300), would it be possible to change the milestone to 10.6.0? |
* fix selectWoo not initializing on layered nav dropdown widget * chore: add changelog entry for selectWoo layered nav fix --------- Co-authored-by: Brandon Kraft <public@brandonkraft.com>
Summary
Fixes the layered nav dropdown widget (
WC_Widget_Layered_Nav) widget not applying Select2/selectWoo enhancement when usingORSince #40686 (WooCommerce 8.3.0), frontend scripts are registered with
array( 'strategy' => 'defer' )by default. The dropdown widget inline scripts register their handles with onlyjqueryas a dependency:In https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/includes/widgets/class-wc-widget-product-categories.php#L244 this is already added.