Simple Membership Plugin › Forums › Simple Membership Plugin › swpm_registration_complete_email_body create content for each membership level
Tagged: Filter
- This topic has 5 replies, 3 voices, and was last updated 5 years, 1 month ago by
tester.
-
AuthorPosts
-
May 4, 2021 at 9:04 am #22521
tester
ParticipantDear,
I am using the swpm_registration_complete_email_body filter to display adapted content following the membership level. But how to get the membership level?
My code :add_filter('swpm_registration_complete_email_body', '123_my_custom_email_confirm_code'); function 123_my_custom_email_confirm_code($output) { if($member_info['membership_level']==intval(7)){ return $output; }else if($member_info['membership_level']==intval(8)){ $output = 'Hi {first_name} {last_name}, Text 1; return $output; }else if($member_info['membership_level']==intval(11)){ $output = 'Hi {first_name} {last_name}, Text 2'; return $output; } }May 6, 2021 at 4:23 am #22531mbrsolution
ModeratorHi, please check the following documentation.
https://simple-membership-plugin.com/simple-membership-miscellaneous-php-tweaks/
Let me know if the above helps you.
Thank you
May 6, 2021 at 1:35 pm #22537tester
ParticipantNothing helpfull, as I can’t know who is the new subscriber if he doesn’t log in. Which is my case, as people who submitted the Registration Form are redirect to a confirmation page (without automatic log in). Then they receive the email from your plugin containing their credentials and the login link. I found all Email Merge tags on https://simple-membership-plugin.com/email-merge-tags-email-shortcodes-for-email-customization/ but I need to customize the email message for each different {membership_level}.
To achieve this, I can only figure out two possibilities
- using the swpm_registration_complete_email_body BUT how can I get the ID of the member who just filled in the registration form knowing he is NOT LOGGED IN (all your hooks to get member info works of cours for logged in members). How can I get the member ID of the member to which the SWPM email will be send? Taking into account that SWPM already get that info to be able to send the “subscription complete” email.
- using if conditions in the SWPM admin panel Settings > Email settings > “subscription complete” email, BUT how to achieve this? Does it accept IF conditions? Like
if({membership_level}=="Level1"){echo "emailtext for level 1 members";}else if({membership_level}=="Level2"){echo "emailtext for level 2 members";}. Which code can be used within your plugin administration panel to achieve this?
May 6, 2021 at 8:12 pm #22542mbrsolution
ModeratorHi, I have submitted a message to the developers to investigate further your issue/request.
Thank you
May 7, 2021 at 2:35 am #22544admin
KeymasterHi, Sorry but any custom coding related stuff needs to be handled as a custom development job so dedicated time can be allocated by the developer and a proper response can be given. Otherwise, we won’t be able to really investigate the requirement and check the code then respond with a solution.
May 11, 2021 at 11:38 am #22576tester
ParticipantI am not asking for custom coding, I am a coder myself. I am asking you to tell me how I can retrieve the variable “memberlevel” a someone who just filled in the registration form so I can use it within the filter swpm_registration_complete_email_body.
-
AuthorPosts
- You must be logged in to reply to this topic.