Fix for incorrect ‘google API invalid’ error following API domain restriction
-
Hi,
Handy plugin, however there is an issue with the is_valid_google_api_key() function in the contact pages contact people plugin, which needs to add an http referer in the header of the wp_remote_get() request so that the new Google API restrictions don’t return an error code (if this restriction has been set for the API key).
In
/admin/includes/fonts_face.phpReplace line 433,
'timeout' => 45
With,
'timeout' => 45, 'headers' => array( 'referer' => get_site_url() )
That seems to fix the issue.
Regards,
Will
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Fix for incorrect ‘google API invalid’ error following API domain restriction’ is closed to new replies.