I’ve added this snippet to my functions.php file but still get the error. I don’t understand the issue.
“This service requires an API key. For more information on authentication and Google Maps Javascript API services please see: https://developers.google.com/maps/documentation/javascript/get-api-key”js:34:315
Geocoder failed due to: REQUEST_DENIED acf-input.min.js:1:31754”
function my_acf_init() {
acf_update_setting('google_api_key', 'my API key');
}
add_action('acf/init', 'my_acf_init');
The key is not domain locked so it’s not a configuration error within the Google Console.
Ok, I added this code instead and now it works, pretty sure the documentation says to use what I have above for Pro and what I have below for regular, but I’m absolutely using Pro.
function my_acf_google_map_api( $api ){
$api['key'] = 'xxx';
return $api;
}
add_filter('acf/fields/google_map/api', 'my_acf_google_map_api');