Hey guys – thanks again for your help on this stuff.
Honestly I just can’t seem to figure out what to do to make this work.
I found this post that seems to have a similar logic.
http://www.s2member.com/forums/topic/custom-capabilities-assistance-please/
And in my previous post I cut and pasted the exact code I’m using…. pasted it below again.
I’m putting the code inside of the functions.php file inside of the wp_include folder through my ftp client.
****THE END GOAL****
I have 4 different products that customers can buy in any combination.
All I want to do is to be able to let them purchase one of the products, or two, or three, or all four.
If not getting all four, they should have the option of purchase 2 or 3 in any combination… or purchase just one.
I’ve labelled each product A, B, C, D.
So a customer can purshase A and B, or A, C, and D, or just D, or just C, and so on… I think you get the point.
Here’s my code below again…
***What Am I missing in my thinking???***
Thanks again!!!
****CODE INSIDE OF THE FUNCTIONS.PHP FILE*****
add_action (“wp”, “my_custom_capabilities”);
function my_custom_capabilities ()
{
if(has_tag(“A”) && !current_user_can (“access_s2member_ccap_A”))
{
header (“Location: “. S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
exit ();
}
else if(has_tag(“B”) && !current_user_can (“access_s2member_ccap_B”))
{
header (“Location: “. S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
exit ();
}
else if(has_tag(“C”) && !current_user_can (“access_s2member_ccap_C”))
{
header (“Location: “. S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
exit ();
}
else if(has_tag(“D”) && !current_user_can (“access_s2member_ccap_D”))
{
header (“Location: “. S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
exit ();
}
====================================================================