Unload Google Fonts | WordPress.org


this is my first time seeking help on this forum and I’m a bit stumped.

I’m developing a WooCommerce shop using the Storefront theme. Because this shop will be located in Germany I need to get rid of all Google Font instances due to the strict data security laws.

There’s one instance of Google Fonts I can’t get rid off no matter what I try.

It loads from the class-storefront.php file and comes from the following code on line 383:
public function google_fonts() {
$google_fonts = apply_filters(
‘source-sans-pro’ => ‘Source+Sans+Pro:400,300,300italic,400italic,600,700,900’,

$query_args = array(
‘family’ => implode( ‘|’, $google_fonts ),
‘subset’ => rawurlencode( ‘latin,latin-ext’ ),

$fonts_url = add_query_arg( $query_args, ‘https://fonts.googleapis.com/css’ );

return $fonts_url;

Has anyone got an idea how to write a snippet for the functions.php file of my child theme to unload the fonts?

Any help would be much appreciated.

Kind regards


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer