Created
October 13, 2025 12:12
-
-
Save JarrydLong/16a49bf9f39a4be33a5c81c2057e799e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Override the Geocoding API key to a private key. This helps if you want to restrict | |
| * usage of the Geocoding API key. This key is not public like the JS Map API Key. | |
| * | |
| * To be used with Member Directory 2.1+ | |
| * | |
| * You can add this recipe to your site by creating a custom plugin | |
| * or using the Code Snippets plugin available for free in the WordPress repository. | |
| * Read this companion article for step-by-step directions on either method. | |
| * https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| * | |
| */ | |
| function mypmpromd_override_geocoding_api_key( $key ){ | |
| $key = "NEW_KEY_HERE"; | |
| return $key; | |
| } | |
| add_filter( 'pmpromd_maps_geocoding_api_key', 'mypmpromd_override_geocoding_api_key', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment