This topic has 9 replies, 3 voices, and was last updated 7 years by Radu.

  • Author
  • #160804
     brownsugar0113
    Participant

    You have dealt with the issue about non paying members receiving complete messages in their emails ,you gave the guy a code but the code did not work and you told him to update his theme,I have updated mine but the issue still remains ,how did you resolve this problem, I have also added the code you gave him but it does not work .

    #161059
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #161062
     brownsugar0113
    Participant

    Thank you

    thank you for your reply ,i really wanted to know how you helped this guy found on this link https://archived.seventhqueen.com/forums/topic/non-members-can-still-read-messages-in-their-email

    Was this issue resolved with him or is he still looking for a solution .Because his solution will also resolve my problem

    thanks again

    Pharel

    #161145
     Radu
    Moderator

    Hi,
    In that ticket it’s provided this snippet

    COPY CODE
    
    
    /* Restrict email messages content to non paying members */
    if ( ! function_exists('kleo_pmpro_restrict_pm_email_content')) {
        function kleo_pmpro_restrict_pm_email_content($email_content, $sender_name, $subject, $content, $message_link, $settings_link, $ud)
        {
    
            $restrict_message = false;
            $restrict_options = kleo_memberships();
            $area = 'pm';
    
            if (pmpro_getMembershipLevelForUser($ud->ID)) {
                $current_level_obj = pmpro_getMembershipLevelForUser($ud->ID);
                $current_level = $current_level_obj->ID;
    
                //if restrict my level
                if ($restrict_options[$area]['type'] == 2 && isset($restrict_options[$area]['levels']) && is_array($restrict_options[$area]['levels']) && !empty($restrict_options[$area]['levels']) && in_array($current_level, $restrict_options[$area]['levels'])) {
                    $restrict_message = true;
                }
    
            //not a member
            } else {
                if ($restrict_options[$area]['type'] == 2 && isset($restrict_options[$area]['not_member']) && $restrict_options[$area]['not_member'] == 1) {
                    $restrict_message = true;
                }
            }
    
            if ($restrict_message) {
    
                $content = 'Your current membership does not allow private messages access.';
                $email_content = sprintf(__(
                    '%1$s sent you a new message:
    
    Subject: %2$s
    
    "%3$s"
    
    To view and read your messages please log in and visit: %4$s
    
    ---------------------
    ', 'buddypress'), $sender_name, $subject, $content, $message_link);
    
                // Only show the disable notifications line if the settings component is enabled
                if (bp_is_active('settings')) {
                    $email_content .= sprintf(__('To disable these notifications, please log in and go to: %s', 'buddypress'), $settings_link);
                }
    
                return $email_content;
            }
    
            return $email_content;
    
        }
    }
    add_filter( 'messages_notification_new_message_message', 'kleo_pmpro_restrict_pm_email_content', 11, 7 );
    

    Php codes should be added to wp-content/themes/kleo-child/functions.php

    And beside the code another think was to have all plugins and theme updated to latest version.

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #161166
     brownsugar0113
    Participant

    Thank you
    You said this code should be added to Kleo Child / functions.php but am using sweet date and i cant find kleo child in sweete date ,should i also download kleo child .am not sure what to do now

    thankyou
    pharel

    #161167
     brownsugar0113
    Participant

    Thanks but this code is it not for kleo child, i have sweete date theme ,so need same code for sweetdate child.thax

    #161239
     Radu
    Moderator

    Sorry, actually it’s sweetdate-child not kleo-child

    So the path will be ; wp-content/themes/sweetdate-child/functions.php

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #161242
     brownsugar0113
    Participant

    looks like this code has been designed for Kleo eg $restrict_options = kleo_memberships() .We need a code for sweetdate.This code does not work on sweet date child,i tried it and when it did not work i checked again that’s when i saw where it said kleo child.Have you tried this code on Sweet date please try it and see if it works . I have also updated all the plugins and the theme is upto date but its still not working.Try it on your side and see if it works,thax

    Thanks
    Pharel

    #161376
     brownsugar0113
    Participant

    Please Help

    #161480
     Radu
    Moderator

    Hi,

    For this matter please ask the paid memberships pro since the question ti’s more related to their product.
    Cheers

    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?