Registering a Google API key with Advanced Custom Fields

You need to register an API key before you can use the Google Maps field. After you obtain an API key, the official documentation for ACF suggests using one of two methods.

// Method 1: Filter.
function my_acf_google_map_api( $api ){
    $api['key'] = 'xxx';
    return $api;
}
add_filter('acf/fields/google_map/api', 'my_acf_google_map_api');
// Method 2: Setting.
function my_acf_init() {
    acf_update_setting('google_api_key', 'xxx');
}
add_action('acf/init', 'my_acf_init');

However, neither worked for me. After digging around, I noticed that if you have Oxygen installed, it overrides google_api_key with the value from its settings page. You don’t have to use either of the above snippets. Instead, go to Oxygen > Settings and set the Google Maps API Key there.