Support

Account

Forum Replies Created

  • For me, the issue was that wordpress (or php) no longer has access to my environment variables. So I just replaced $_ENV[“GOOGLEKEY”] with my actual google key. But this really is a bad hack because it means I can’t make my plugin repo live without exposing my key. Not sure what changed, but I’ll post back if I figure out a way to do this.

  • Google Maps field worked for a while, but it is no longer appending my API key on the backend in ACF v5.8.7, in the latest version of wordpress.

    I am getting the “util.js:232 Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys” in the console.

    I have made no change to my api key code, which is as follows (and is part of a custom plugin I wrote for my site):

    /** Google Map API Key for place lookup */
    function my_acf_google_map_api( $api ){
            $api['key'] = $_ENV["GOOGLEKEY"];
            return $api;
    }
    add_filter('acf/fields/google_map/api', 'my_acf_google_map_api');

    I am also enabled for billing and Geocoding, Geolocation, Maps Javascript API and Places API in the Google Developer Console.

    Any ideas?

    By the way: I really love this custom field, having tried maps in many others. Thanks for building this tool!

Viewing 2 posts - 1 through 2 (of 2 total)