Written by Anonymous
add_action('template_redirect', function() { if (is_page('208')) { $referer = array('https://digital-jinja.com/sanpai/', 'https://buy.stripe.com/test_aEU3eR1af5EA6Q07ss'); $arrlength = count($referer); for($x = 0; $x < $arrlength; $x++){ if (!isset($_SERVER['HTTP_REFERER']) || $_SERVER['HTTP_REFERER'] !== $referer[$x]) { wp_safe_redirect($referer[0]); exit(); } } } });