strangerstudios / pmpro-membership-maps

Works with Paid Memberships Pro and the Member Directory Add On to add maps to the directory and profiles.
https://www.paidmembershipspro.com/add-ons/membership-maps/
2 stars 8 forks source link

On page load Google warning in console - JavaScript API has been loaded directly without a callback #69

Open kimwhite opened 1 year ago

kimwhite commented 1 year ago

Describe the bug When loading the Map, console shows warning: Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns, please see https://goo.gle/js-api-loading

To Reproduce Steps to reproduce the behavior:

  1. Add Map to site
  2. Set up map with google keys
  3. load the directory page
  4. See the warning in the console

Screenshots Screenshot 2023-06-06 at 8 33 54 AM

Expected behavior No warning.

Isolating the problem (mark completed items with an [x]):

WordPress Environment

``` WordPress - version: 6.2.2 PMPro - Version 2.10.7 PMPro Map Add On - Version 0.5 PMPro Members Directory - Version 1.1 ```