Skip to content

Commit 742d860

Browse files
committed
Check for API key only if fonts are force fetched
1 parent 64b3a71 commit 742d860

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/php/class-design-assets-rest-controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public function get_fonts( $request ) {
195195

196196
$fonts = new Update_Fonts( 'force' === $force, false, true );
197197

198-
if ( ! $fonts->has_api_key() ) {
198+
if ( 'force' === $force && ! $fonts->has_api_key() ) {
199199
return new WP_Error(
200200
'rest_fonts_no_api_key',
201201
$fonts->material_design_no_apikey_textonly()

0 commit comments

Comments
 (0)