Thanks. I looked through the parent theme (not the child theme) and found several things:
1)
It uses wp_enqueue_script for both:
- optimizer_map, which loads this file:Â /wp-content/themes/optimizer_pro/assets/js/map-styles.js
- and optimizer_googlemaps, which loads this file:Â https://maps.googleapis.com/maps/api/js?key=AIzaSyC……NqOg (I obfuscated it)
2)
Notice on that 2nd one, it has a hard-coded Google Maps API key. Yikes!
I’d suggest you report this to the theme author, as it may be against Google Maps’ terms and/or they may not realize their API key is being used by everyone who runs their theme.
3)
It might be advisable in this situation to dequeue the duplicate scripts. I came up with this code snippet but did not test it (since I never activated the Optimizer Pro theme or the child theme you sent me):
https://gist.github.com/cliffordp/ca3baf77c9be8b72f37db10c7c91783b
Please let me know how it goes for you.