Hi John. Thanks for those suggestions.
~ really, much appreciated!While I'm not wild about the
?s2-ssl=yes either, I can assure you that much thought was given to this technique. You see, the issue is that s2Member Pro Form processors need to know when a Post/Page is submitted with SSL Filters applied; because s2Member's SSL Filters work together at converting a Post/Page to SSL, while still making sure that other portions of the site are NOT, including some important links within WordPress core functionality that would normally default to
https:// whenever a Post/Page is running in SSL mode. In other words, the act of "forcing" SSL on a specific Post/Page, tells s2Member that the rest of your site is obviously not, and generally should not, be running in SSL mode.
Since most form processors
( including those that come with s2Member Pro ), are processed on the "
init" action Hook, s2Member needs to know when it should and/or should not deal with SSL Filters.
The "
init" action Hook comes before the WP Query, so there is no other way for s2Member to know that a site owner has requested its SSL Filters during the "
init" Hook. Thus, we need a way
( other than with the https:// protocol ), to know when a Post/Page is being handled by s2Member's SSL Filters.
Although not as elegant as we'd like, the
?s2-ssl=yes parameter is a reliable approach to this otherwise troublesome issue; particularly when it comes to PayPal® Express Checkout, where a Customer actually leaves the host domain all together, to return later with SSL Filters applied
( i.e. with ?s2-ssl=yes ).
* Note. This will have no effect on
get_permalink(). s2Member will force the query string argument
( i.e. ?s2-ssl=yes ) automatically whenever `s2member_force_ssl = yes`. If other plugins are causing a conflict in some way, I recommend NOT using s2Member's SSL Filters, and instead dealing with this through an
.htaccess file. There are some tricks offered
here.
* Note. All tricks aside though, the functionality that s2Member offers here is unique. That is, s2Member's SSL Filters have the unique ability to convert a specific Post/Page over to SSL, including all media contained within it, while not affecting other links on the page. In other words, s2Member's goal is to force checkout pages to SSL, but NOT the entire site. This is something that is not possible unless you're using `s2member_force_ssl = yes`, or another plugin that offers similar functionality.
* Note. While I completely understand your concern over referrer detection, we feel the
?s2-ssl=yes parameter gives other plugins a way of recognizing the intention of s2Member in a global way. For instance, inside WordPress® Hooks, such as the init Hook I mentioned.
* Note. So while this DOES add a non-standardized query string argument to your URL; which again, we are not wild about, it does serve a very important purpose.
We have also made it possible to change the name of this variable if you prefer.
Here is an example.Create this directory and file:/wp-content/mu-plugins/s2-hacks.php
- Code: Select all
<?php
add_filter("ws_plugin__s2member_check_force_ssl_get_var_name", "my_function");
function my_function(){ return "my-s2-ssl"; }
?>