I just realised that the fix for #26 we introduced with #45 is incomplete as things can possibly still fail as people can opt to stick with select2 v3 even with ACF5.6+.
So instead of deciding based on the ACF version we'll probably need to determine what is actually enqueued on the page with acf_get_setting('select2_version'), expose this client side as part of the JS config and decide upon this data on how to scrape inside the taxonomy scraper.
I just realised that the fix for #26 we introduced with #45 is incomplete as things can possibly still fail as people can opt to stick with select2 v3 even with ACF5.6+.
add_filter('acf/settings/select2_version', function(){ return 3; });
See https://www.advancedcustomfields.com/blog/acf-pro-5-6-0-ui-ux/ and https://www.advancedcustomfields.com/resources/acf-settings/ for more Details.
So instead of deciding based on the ACF version we'll probably need to determine what is actually enqueued on the page with
acf_get_setting('select2_version')
, expose this client side as part of the JS config and decide upon this data on how to scrape inside the taxonomy scraper.