Due to restrictions enforced by PayPal, it's not currently possible to create an s2Member Pro Form Coupon Code for a 100% discount because PayPal requires the checkout to total at least $0.01.
To get around this, you can use an s2Member Free Registration Form (s2Member Pro required) to allow your visitors to register without paying.
You can generate a Free Registration Form from WP Admin -> s2Member -> PayPal Pro Forms -> PayPal Pro / Free Registration Forms
Restricting Access to the Free Registration Form
To help prevent unauthorized access to the Free Registration Form, you have a few options.
- Use a voucher/coupon code in the URL and check to see if the code is present and valid before displaying the Free Registration Form.
- Create a custom HTML form that accepts a voucher/coupon code and then write custom PHP code to check the code against a known-list of codes, only providing access to the form if the code is valid.
While the second option provides more flexibility and helps prevent the sharing/reuse of the code, it requires more custom programming. In this article, I will explain how to accomplish the easier of the two methods: Using a voucher/coupon code in the page URL and displaying the Free Registration Form if the code is present.
For example, if your purchase page is located at http://example.com/purchase/, then visitors will need to use http://example.com/purchase/?voucher=free to display the Free Registration Form. (You can change free to anything you like in the PHP code that you add to the page; see below.)
Verifying the Voucher/Coupon Code using PHP
<?php if (isset($_GET['voucher']) && $_GET['voucher'] == 'free') { ?>
Show the free registration form.
<?php } else { ?>
Show the payment form.
<?php } ?>







Pre-Sale FAQs
Video Tutorials
Support Forums
Knowledge Base
News / Updates
s2 Codex / Docs
GPL v2 License
Happy Customers
Private Contact
About Us
Support Policy
Privacy Policy












s2Member® (Back To Home)
Framework Plugin (Free)
s2Member® Pro (Upgrade)





