Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

[Support request] swpm_registration_complete_email_body create content for each membership level

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.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • May 4, 2021 at 9:04 am #22521
    tester
    Participant

    Dear,

    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 #22531
    mbrsolution
    Moderator

    Hi, 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 #22537
    tester
    Participant

    Nothing 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

    1. 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.
    2. 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 #22542
    mbrsolution
    Moderator

    Hi, I have submitted a message to the developers to investigate further your issue/request.

    Thank you

    May 7, 2021 at 2:35 am #22544
    admin
    Keymaster

    Hi, 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 #22576
    tester
    Participant

    I 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.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy