Could you please check after adding the below code snippet in your child theme’s functions.php file to include ‘selectWoo’ in another name.
function th34r_enqueue_custom_scripts($hook) {
if(is_checkout()){
wp_register_script( 'selectWoo2', plugins_url() . '/woocommerce/assets/js/selectWoo/selectWoo.full.js', array( 'jquery' ), '1.0.0', false );
wp_enqueue_script( 'selectWoo2' );
wp_enqueue_style( 'select2');
}
}
add_action('wp_enqueue_scripts', 'th34r_enqueue_custom_scripts', 10);
add_filter('thwcfe_public_script_deps', 'th34er_public_script_deps', 99);
function th34er_public_script_deps($deps){
if(is_checkout()){
$key = array_search('selectWoo', $deps);
unset($deps[$key]);
}
return $deps;
}
Could you please check and verify if this works for you?
Thank you!
Hi
The new script gets loaded, but the error is still showing up.
Do you know, why
wp_register_script( 'select2', plugins_url() . '/woocommerce/assets/js/selectWoo/selectWoo.full.js', array( 'jquery' ), '1.0.0', false );
wp_enqueue_script( 'select2' );
does not work? Only when I change the name of the handle, the script gets embedded.
Your issue needs a detailed check. Can you please raise a ticket through our website? We hope our technical team will be able to help you.
Thank you!
Since we haven’t heard back from you, we believe that your issue is resolved.
We are going to mark this thread as resolved.
Thank you!