Restricting private messages
-
I am looking for some help with restricting private messages.
I have Paid Memberships Pro – BuddyPress Add On Version 1.2.1 and BP Better Messages (Premium) Version 1.9.7.9 with WordPress 5.1
BuddyPress Version 4.2.0I am looking for a way to restrict the private message option for certain type of users. I am trying to have this modification multiple ways, with and without PMPro but none of them working so far.
With PMPro I supposed to restrict easily, still I can only totally restrict all BuddyPress functions or enable all of them, customization looks like broken.
I looked into the codes of all the mentioned plugins, tried to restrict access by using below code that I found in another topic:
add_filter( 'bp_get_send_message_button', function( $array ) { if ( pmpro_hasMembershipLevel('Premium') ) { return $array; } else { return ''; } } );
Maybe I am just trying to make it too complicated and there is an easier way to do it with shortcodes under the Members page that currently contains only [bps_directory] shortcode.
Any suggestion and help would be welcome.
- You must be logged in to reply to this topic.