Specific Post/Page Access Restrictions not working

I followed the instructions in the video on setting up a Gift Codes page and selling that page. Actually, I an using this to sell several coupons so someone can have individual members of their family create accounts for free after the primary account holder pays for the Family Membership.

It worked at first and then I started tweaking the pages and now everything seems to work accept for the restrict access to the page with the coupons – that page is specifically restricted by id in the Specific Post/Page Access Restrictions area; however, the page is visible to everyone.

Any ideas?

Also, one thing I have changed is I am using a child theme.

Thank you in advance,
Bill

Hey Bill, @MCBAwebmaster

I am going to assume it is an issue with the theme change. Can you do a quick test by switching to the ‘old’ theme? Does it work again?

Also what themes (old and new) are you using?

Can you provide a link so that we can see the page?

Thank you for the reply. Changing the theme did not work. That is, I changed it to the WordPress TwentyTwenty theme and saw no difference.

So, let me provide some details:

Step 1: I created a page Redemption Codes (page id=490) and used this shortcode:

[s2Member-Gift-Codes discount=“100%” quantity=“4” singulars=“358” /]

Note: singulars=“358” is the page id of the page Redeem Codes which was created in Step 3 below.

Step 2: I restrict the Redemptions Code page (page id=490) through the settings at
s2Member (Pro)->Restriction Options->Specific Post/Page Access Restrictions

Step 3: I create the page Redeem Codes (page id=358) using the shortcode shown above and repeated here:

[s2Member-Pro-PayPal-Form level=“2” ccaps="" desc=“Extra Family Member / Coupon used for 12-month membership.” ps=“paypal” lc="" cc=“USD” dg=“0” ns=“1” custom=“my sites URL” ta=“0” tp=“0” tt=“D” ra=“10.00” rp=“1” rt=“Y” rr=“BN” rrt="" rra=“2” accept=“paypal” accept_via_paypal=“paypal” coupon="" accept_coupons=“1” default_country_code="" captcha=“0” /]

Note: accept_coupons=“1” is set and this ProForm is intended to create a level 2 user.

Step 4: I created a page Purchase Codes (page id=363) and use the s2Member (Pro)->PayPal ProForms->Specific Post/Page (Buy Now) Forms to create this shortcode:

[s2Member-Pro-PayPal-Form sp=“1” ids=“490” exp=“1” desc=“Additional Family Member Redemption Codes” ps=“paypal” lc="" cc=“USD” dg=“0” ns=“1” custom=“my sites URL” ra=“0.01” accept=“paypal” accept_via_paypal=“paypal” coupon="" accept_coupons=“1” default_country_code="" captcha=“0” /]

Now, I test out the pages:

  1. Beginning from a logged out status, I register a new user with userid = user1.
  2. User1 logs in and goes to page Purchase Codes and complete the purchase.
  3. I then follow the Thank you … click here link which takes me to the Redemption Codes page id=490.

Here is the problem or perhaps my misunderstanding. The page that I am sent to has variables tacked on on the URL, the URL looks like:
mySiteURL/redemption-codes/?s2member_sp_access=ZGVmNT … shortened here … 2RjNGE5#

However, if User1 tries to return to the page using a link to the Redemptions Code page that I might provide for them and obviously does not have the URL variables, I don’t get back to that users page, rather, I get this URL instead and the page presented is the Welcome Options page.
mySiteURL/membership-options/?_s2member_vars=sp…sp…490…page…490…L3JlZGVtcHRpb24tY29kZXMv&_s2member_sig=1601307498-05492190441eaf99099b8737b825d7f4

What am I doing wrong? Or, do I misunderstand how this is suppose to work?

And yes, when I use the saved URL that is returned after the purchase of the codes using the click here link, this page does expire in 1 hour as I specified in the shortcode.

Thank you in advance,
Bill

Bill, @MCBAwebmaster,

Yes, there is an understanding issue. Things are working as designed.

First thank you for your very clear description of what you were doing.

When you sell a page or post, the LINK is granting permission to the page. [The link provided in conformation email].

The user is NOT granted any site rights. The only access for the user is the link sent in the email. If they need to revisit the site and page, they either need to bookmark the URL or use the email link to get back in. The info passed in the link is the code used by S2 to determine if the link should still have access to that page.

Now A Thought: If you only give these codes to paid registered users, and you always give them… You could create a page with level X security(same as the user’s) access and provide the same list of codes. These codes would be unique to that user. And it will even let them see which ones have been used. I could go deeper here but I don’t know if this is something interesting or not.

Well that helps. First, I am not getting an email with a link to the Redemption Code page after the page is purchased. I am using a Gift Code for that, is that a problem?

Concerning your comments about my misunderstanding. I was afraid that I was misunderstanding it and needed to make sure. I had tried your suggestion before but must have had other issues because it did not seem to work.

Ok. So, I just took another crack at it and removed the Specific Page Restriction for the Redemptions Code page and added a Level 3 and Higher Code for that page and it seems to be working. The Level 3 folks are the ones purchasing the Redemptions Codes which they will then send to their family members who use the Redemption Code to get a free family membership as a Level 2.

All of this is what I am trying to automate with emails and I have somewhat successfully done that too. A little clunky but it works. Now, I just need to see if my testers think this process makes sense and is easy enough.

Thank you for your help,
Bill

@MCBAwebmaster,

Good to hear you’re moving forward. Now that you have moved the coupons to a level access system, there is a new issue with email(s) though. There is no ‘subscription level’ specific email.

One thought is that you could put the link to the coupon page in the web page menu. s2 will only show the menu item to a member with the correct access level.

Thinking about it… You could add a custom capability to the coupons page. And then sell them as such. This would send an email which you could provide the link. The page would have a ccap user requirement which is different then member level access but can still be checked with a short code if I recall correctly. This is getting a little deep though.

It is a little hard to give you better ideas at this point without a little more information. If you want, you can Direct Message me with a contact number and I am willing to see if we can hash it.

Thank you for the follow-up. I’m relatively happy now with the approach. I did think of the ccaps idea as well but didn’t see how it would be fundamentally different than the page visibility by level approach. I have to say Visible if greater than Level 3 which means the few Level 4’s will see the page but they can’t use the coupons … probably just a slight annoyance for the level 4 folks. Getting an email is no longer needed.

What prompted me to think about ccaps was that I would like to limit the time each Level 3 has access to the Redemption Codes page. If I could somehow remove a that ccap for an Level 3 user 7 days after they registered, e.g. (EOT in days - (365-7)),then I would have everything I need. Any thoughts on that on how I could accomplish that?

One last question for now. If I add ccap=2020 for people registering this year and then change the ProForm shortcode in 2021 to ccap=2021, will the 2021 just be appended to the ccap giving me a list like ccap=2020,2021 for that user or will will the ccap=2020 be replaced with ccap=2021?

Thank you very much,
Bill

@MCBAwebmaster,

Mixed news…

Per the current ccap documentation: " By default, a Checkout Button or Form generated by s2Member is designed to (Add) Custom Capabilities to any that may or may not already exist for a particular User/Member. However, starting with s2Member v110815+, you can tell s2Member to (Remove All) Custom Capabilities, and then (Add) only the new ones that you specify. This is accomplished on a per Form/Button basis by preceding your comma-delimited list of Custom Capabilities with -all. For further details on this topic, click the [?] icon next to the Custom Capabilities field in any Button/Form Generator supplied by s2Member."

And Also: " Independent Custom Capabilities are added to a Customer’s account immediately after checkout, and the Customer will have the Custom Capabilities for as long as their Membership lasts, based on their primary Subscription with your site, and/or forever, if they have a Lifetime account with you. In other words, Independent Custom Capabilities will exist on the Customer’s account forever, or until an EOT (End Of Term) occurs on their primary Subscription with you; in which case s2Member would demote or delete the Customer’s account (based on your EOT configuration) , and all Custom Capabilities are removed as well."

Thank you for all your help. Since you have been helping and understand what I am trying to do and wanted to take this conversation with you one step further if you will indulge me.

What I want to accomplish with all of the “standing on my and trying to play the piano” is simply create a membership process for creating a family membership whereby one family signs up, pays and additional family members are added. I understand that s2Member does not understand membership hierarchy so what I want to do is not explicit addressed. After creating the capability as I did, it has proved to simply be too hard for even intelligent, web-savvy people (my testers) to get through the process. Of course, that could be my implementation. I have literally spent hours trying to do this!

So, here is my questions:

  1. am I missing something, e.g. there is an easy way to have a family membership and I am just not seeing it? If so, what is it?

  2. If your answer is no, s2Member simply does not do that, are you aware of a plugin that does do memberships well that includes a family registration capability? And, can I get my money back on s2Member Pro?

I really appreciate you patience and help.

Regards,
Bill

@MCBAwebmaster,

Hey Bill,

No you are not missing anything. The Membership options are really kind of forced by WordPress. WordPress is just not designed for this type of enrollment. I thought I remembered some plugin that had something like what you were looking for (it overruled WP security to do something like this) but when I looked today I could not find it.

I do understand what you are trying to do and although you might be able to make it easier (I have not seen your current ‘process’) I don’t believe it will ever be the smooth sign-up and add family members and have everyone expire together etc. type of site while using WP (s2Member or not).

As for refunds, I am only another user like you. You will need to contact them. Their policy in part:

s2Member® Pro Refund Policy

We’re committed to building the best software for WordPress and we stand by our work. The following policy outlines what is required to qualify for a refund. Note that s2Member Pro is delivered as an open-source digital item (i.e., it is irrevocable software that comes with a GPL license, much like WordPress itself). For this reason, refunds are granted at our sole discretion, and on a case-by-case basis.

Hi,

I have been using this page restrictions option perfectly, and in the last few weeks it’s broken.

I think it could have something to do with wordpress updates. It looks like S2Member Pro hasn’t been updated since Feb 2020 but there have been wordpress updates since then.

Any ideas?