Skip to content

Instantly share code, notes, and snippets.

@SiR-DanieL
Created February 12, 2018 06:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SiR-DanieL/718852e08a602bdbc7452904ed30d6e3 to your computer and use it in GitHub Desktop.
Save SiR-DanieL/718852e08a602bdbc7452904ed30d6e3 to your computer and use it in GitHub Desktop.
functions.php
add_filter( 'woocommerce_get_script_data', 'my_strength_meter_custom_strings', 10, 2 );
function my_strength_meter_custom_strings( $data, $handle ) {
if ( 'wc-password-strength-meter' === $handle ) {
$data_new = array(
'i18n_password_error' => esc_attr__( 'Come on, enter a stronger password.', 'theme-domain' ),
'i18n_password_hint' => esc_attr__( 'The password should be at least seven characters long.', 'theme-domain' )
);
$data = array_merge( $data, $data_new );
}
return $data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment