BuddyDev

Search

[Resolved] Recent Visitors

  • Participant
    Level: Enlightened
    Posts: 25
    kiki on #41424

    Hello,

    We recently purchased your “Recent Visitors” plugin, and turned on ‘Enable Local Notification’ in the Admin Section. However, we realized that “Receive Notification on new profile visits?” (if you look from a user’s perspective on their profile under “Settings”) is set to “No” by default.

    We want this to be “Yes” by default so that local notifications can be initially shown on the main Notifications list, and if users don’t want them, they can then set it to “No” themselves.

    How can we change this Settings option to be “Yes” by default?

    Thank you.

  • Participant
    Level: Enlightened
    Posts: 25
    kiki on #41425

    Just to clarify—

    We’re referring to the profile “Settings” section under ‘Email’ that says:

    Receive Notification on new profile visits? No
    Receive Notification on new profile visits by email? No

    …NOT this one: https://i.imgur.com/WGALnJP.png

  • Keymaster
    (BuddyDev Team)
    Posts: 24237
    Brajesh Singh on #41444

    Hi Kiki,
    Thank you for purchasing from us.

    I am sorry, we haven’t been able to assist you as our offices are closed due to Diwali holidays here. Please allow us to assist you after 6th.

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 25
    kiki on #41451

    Hi Brajesh,

    You’re welcome.

    Okay, thank you for letting me know.
    Happy holidays! 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 24237
    Brajesh Singh on #41479

    Hi Kiki,
    Thank you for the patience.

    Our team is looking at it today and we will be assisting you with it in couple of hours.,

    Regards
    Brajesh

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2936
    Ravi on #41480

    Hello Kiki,

    You can set the default user settings under Settings > Recent Profile Visitors > Default in the admin section. Please give it a try and let me know if it solves your problem or not.

    Regards
    Ravi

  • Participant
    Level: Enlightened
    Posts: 25
    kiki on #41482

    Hi Ravi,

    Yes, that solved the problem. Thank you.

  • Participant
    Level: Enlightened
    Posts: 25
    kiki on #41483
    This reply has been marked as private.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2936
    Ravi on #41505

    Hello Kiki,

    Please try the following code it will disable “Recent profile visits component” by Paid Membership Pro membership name.

    
    add_filter( 'visitor_is_enabled_for_user', function ( $is_enabled, $user_id ) {
    
    	if ( ! function_exists( 'pmpro_getOption' ) ) {
    		return $is_enabled;
    	}
    
    	$level = pmpro_getMembershipLevelForUser( $user_id );
    
    	// Replace this by user level name.
    	if ( $level && $level->name = 'gold' ) {
    		return true;
    	}
    
    	// All other cases return false.
    	return false;
    }, 10, 2 );
    

    Regards
    Ravi

  • Participant
    Level: Enlightened
    Posts: 25
    kiki on #41518

    I replaced the ‘gold’ with the user level name, as you instructed… Tried both uppercase and lower case. It did not work. “Recent profile visits component” is still enabled for all membership names.

The topic ‘ [Resolved] Recent Visitors’ is closed to new replies.

This topic is: resolved