Reply To: zxcvbn-async.min file is loading for all pages

Home Forums Pie-Register 2.0 Support zxcvbn-async.min file is loading for all pages Reply To: zxcvbn-async.min file is loading for all pages

#4627

PIE REGISTER
Keymaster

Hello,

PR doesnt register that script so it wont help whether you use an older version or newer version. the problem the way that script is being registered is wrong. You can however deregister, register again and enqueue back the script.

This is how you’d do:

add_action('wp_enqueue_scripts','zxcvbn_script_fix',1);
function zxcvbn_script_fix(){
    wp_deregister_script( 'zxcvbn-async' );
    wp_register_script('zxcvbn-async', '//YOUDOMAIN.com/wp-includes/zxcvbn-async.min.js',array(),'1.0');
}

hope it helps
Best