-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Break link between billing addresses and map pin location #76
Comments
I agree, this is quite crucial! |
I've come up with a work around for anyone in the meantime. First step, create a some User Fields. I've done this based on the following article: https://www.paidmembershipspro.com/types-of-addresses/ Essentially you create a user field section and add the following fields: Then you can add this little snippet I did to your functions.php child theme file. `
} add_action( 'pmpro_personal_options_update', 'update_lat_lng_from_physical_address' ); |
Currently, each user's map location is based on their most recently used billing address. In situations where users have orders for multiple levels which may be using different payment methods, this may mean that a single user may have their location jump back and forth between billing addresses as new payments are made.
Instead, we should give users a different setting to choose their map pin location instead of trying to "detect" it. Not only does this make the plugin more compatible with MMPU, but it also allows users to set their pin location as somewhere other than their billing address. For example, if the map was showing company locations, the company location may not always be the same as the billing address used to purchase the membership.
In summary, the suggestion here is to track map pin location separately from billing addresses.
The text was updated successfully, but these errors were encountered: