Prevent versioning for .woff (font) files

If you load your fonts using standard stylesheet enqueueing then you can add this to your functions.php file:

function remove_querystrings( $src ) {
    $parts = explode( '.woff?ver', $src );
    return $parts[0];
}
add_filter( 'style_loader_src',  'remove_querystrings', 15, 1 );

I haven’t tested this but I’m fairly certain it will only work if you’re adding the fonts with wp_enqueue_style();.

I use the above in production environments to remove the query string from all scripts and styles not just fonts, but that’s only on finalized sites where the only updates are to content. (On that note, I’ve never tested it with .woff in front of the ?ver.)