Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Resctrict private messages

@empressdianna

Participant

Found this on another forum and after some tweaking finally got this to work. This will only work if you force all new and existing non-paying users into one group however without some further tweaking. If a non-paying user tries to click on the “messaging” tab in wordpress it will redirect them to any page you choose. I chose the memberships level page. =D

function bp_disable_messaging() {
	global $bp;
	
	if ( pmpro_hasMembershipLevel('NonPayingLevel') && bp_is_current_component('messages') ) {
		wp_redirect( site_url("/PAGE URL/") );
		exit();
	}
}
add_action('wp','bp_disable_messaging');
Skip to toolbar