MemberPress: Whitelist Domains

function mepr_custom_is_domain_whitelisted() { $whitelist = array( “domain.com, domain1.com” ); //comma-separated list of domains $domain = parse_url( $_SERVER[ ‘HTTP_REFERER’ ], PHP_URL_HOST ); if ( !empty($domain ) && in_array( $domain, $whitelist ) ) { return true; //Exclude from paywall } return false;…Continue reading