Reply To: Redirect if user does not have the correct ccap

Forums General Redirect if user does not have the correct ccap Reply To: Redirect if user does not have the correct ccap

#375

Deprecated: wp_make_content_images_responsive is deprecated since version 5.5.0! Use wp_filter_content_tags() instead. in /nfs/c09/h02/mnt/138233/domains/s2member.net/html/wp-includes/functions.php on line 4773

Well, you could customize the behavior in different ways…

You can change the Membership Options Page’s content with conditionals, using the MOP Vars. WP Admin -> s2Member -> Scripting -> Membership Options Page Variables

Or, you could try a must-use plugin that checks if the required access is the ccap you’re talking about, and redirect the person to another page instead. Or do the redirection in the page with a conditional and a JavaScript redirection.

Maybe somthing like this: In /wp-content/mu-plugins/s2mop-redir.php

<?php
if (!empty($_REQUEST['_s2member_vars']))
   @list($restriction_type, $requirement_type, $requirement_type_value, $seeking_type, $seeking_type_value, $seeking_uri)
        = explode("..", stripslashes((string)$_REQUEST["_s2member_vars"]));

if (!empty($seeking_value) && $seeking_value == 'yourccaphere' ) {
   header('Location: http://www.yoursite.com/yourccapsalespage');
   exit;
}

Not tested, but I hope it helps. 🙂