As you know zxcvbn.min.js is around 400kb and loaded by default in wordpress websites , I want to know how I can prevent this JavaScript library to load As I don\'t want passwo
The previous answer didn't worked for me, maybe because I usewp_enqueue_scripts
so here is my setup that got me rid of the wc-password-strength-meter
:
function my_add_frontend_scripts() {
// Deregister script about password strenght meter ~ 800kb
wp_dequeue_script('wc-password-strength-meter');
wp_deregister_script('wc-password-strength-meter');
wp_register_script('custom-script', get_stylesheet_directory_uri().'/custom-script.js', array('jquery'), 1, false );
wp_enqueue_script('custom-script');
}
add_action('wp_enqueue_scripts', 'my_add_frontend_scripts');