- This topic has 4 replies, 2 voices, and was last updated 10 years, 8 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember General Questions › Mailchimp Autoresponder auto-update list field on membership upgrade
Tagged: mailchimp
Hi,
I’ve got my mailchimp autoresponder working with my custom field, in this case the membership level.
The issue is that I need to also be able to automatically update the membership level on mailchimp when a user upgrades from their free membership level to a paid membership level on my website. Where does wpeMember handle membership upgrades so I can implement the mailchimp list field update?
Can you tell me how you have your membership upgrade path setup so I know which code will be executed. If you share the link of your payment/upgrade page, I will get my answer.
[http://www.squareonefitness.tv/join/]
Thank you. There are two ways you can add your custom tweak:
Option 1) We have an action hook that gets fired when that membership level of the user changes. You simply hook into that and execute your code.
Here is an example of how you would use that hook
add_action('emember_membership_changed','do_my_custom_tweak');
function do_my_custom_tweak($data)
{
$member_id = $data['member_id'];//You can use this to pull this members profile
$old_membership_level = $data['from_level'];
$new_membership_level = $data['to_level'];
//Now do something....
}
Option 2) You can add your code tweak in the following file:
wp-eMember/ipn/eMember_handle_subsc_ipn_stand_alone.php
Search for the following comment in the above file:
// End of existing account upgrade
Add your code just above that comment (inside the actual if statement block)
Awesome – thanks for your detailed response!