admin管理员组

文章数量:1429376

I want to set up a page with PayPal subscription gate away to my members area. It's a simple page with PayPal button which offer discounted subscription price for the chosen customers only.

Therefore I want to give one time access to it. So when the visitor leaves the page to go to PayPal to start subscription and then return to the page - access will be denied. The new access will be denied even if he/she do not subscribe. In short, it is one time visit. This will stop them spreading this offer all over the net.

Would appreciate if you provide the code or plugin for this. Thanks

I want to set up a page with PayPal subscription gate away to my members area. It's a simple page with PayPal button which offer discounted subscription price for the chosen customers only.

Therefore I want to give one time access to it. So when the visitor leaves the page to go to PayPal to start subscription and then return to the page - access will be denied. The new access will be denied even if he/she do not subscribe. In short, it is one time visit. This will stop them spreading this offer all over the net.

Would appreciate if you provide the code or plugin for this. Thanks

Share Improve this question asked Apr 27, 2019 at 21:22 VitVit 1 1
  • Hey hey, welcome to WordPress Stack Exchange! We love to help you. But plugin recommendations are off-topic. And coding requests are too broad unless you can show us what you tried yourself so far and where exactly you are stuck. Please visit the help center and learn How to ask a good question. Thank you and good luck – norman.lol Commented Apr 27, 2019 at 22:02
Add a comment  | 

1 Answer 1

Reset to default 1

Although this is not a WP question, it could be done with some PHP/MySQL code. Just the psuedocode:

  • generate a GUID value on each main page visit
  • check if the GUID is already in the GUID database
  • if not, store the GUID in the GUID database
  • if GUID exists in the database, redirect to another page ("you were already here, only one per customer" message)

This requires a GUID database that you get to build. And all of the PHP/MySQL code to implement.

Then, create a template from your theme (and a Child Theme to put it in). Add the code to check/store the GUID to that template.

You could also make it into a plugin, where the plugin checks for the page-id of the page you want to limit, so the plugin only runs on the specific page.

But, again, this is not a WP Development question. You'll have to build it yourself. But it can be done. My approach is only one way; there are probably others discoverable via the googles (or bings or ducks).

本文标签: linksone time visit to the page