Support

Account

Home Forums Backend Issues (wp-admin) Google Maps field needs setting to add API key Reply To: Google Maps field needs setting to add API key

  • As I was looking through the source code I found this filter in the get_setting() function

    
    […]
    // filter for 3rd party customization
    if( substr($name, 0, 1) !== '_' ) {
      $value = apply_filters( "acf/settings/{$name}", $value );
    }
    […]
    

    So you could simply add a filter like this:

    
    add_filter('acf/settings/google_api_key', function ($value) {
      return 'YOUR_API_KEY';
    });