add_filter( 'nav_menu_submenu_css_class', 'change_wp_nav_menu', 10, 1 );
function change_wp_nav_menu( $classes, $args, $depth ) {
foreach ( $classes as $key => $class ) {
if ( $class == 'sub-menu' ) {
$classes[ $key ] = 'sub-menu visible-sub-menu';
}
}
return $classes;
}