This code snippet works when content is protected by MemberPress Rules. By default, logged-out visitors, and members without a proper subscription, will not be able to access protected content.
When this code snippet is active, it will whitelist HTTP referrer domains. This means, that any visitor referred from these referrer domains (e.g. affiliate website domain) will bypass MemberPress rules and paywall settings. As a result, they will gain access to the protected content.
The code must be modified by adding the domains that should allow the bypass on the following line:
$whitelist = array( "domain.com, domain1.com" );
The dummy domains (domain.com and domain1.com) should be replaced by the actual domains of your referrer websites. You can add one or more domains, separating each domain with a comma.
Note: This code snippet works only if visitors are referred from the domain specified in the code. It does not apply to visitors referred from any emails.
Comments