The Membership Maps Add On for Paid Memberships Pro is designed to geocode a member’s Billing Address information at membership checkout. If you are just installing this Add On, there are existing members in your site that have not yet had their address processed for display on the membership map.
This recipe will run a batch process on 30 members at a time to properly geocode their information for display.
The Code Recipe
Adding the Recipe to Your Website
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.
After installing the recipe, you must navigate to yourdomain.com/wp-admin/?pmpromm_process=true
to trigger the batch process. The process is designed to run for 30 members at a time. You can adjust this number to increase batch sizes. Note that the Google Maps Geocode API has a daily limit of 2,000 requests.
By default, this recipe will pull the user’s last order Billing Address for use in geocoding. If you would like to geocode a different address stored in the user, you must adjust the process in the recipe. To use an alternate address type for geocoding new member locations, use the pmpromm_member_address_after_checkout
hook.
Free Course: Membership Site Development—The Basics
Develop a deeper understanding of membership site development in this beginner-level course. Learn how to make your site work better, save yourself time and money, and improve your site's performance.