Merge pull request #6909 from gregory-p/wordpress

LAW-5539
This commit is contained in:
bivis
2022-06-20 10:38:09 +03:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -357,7 +357,7 @@ function mark_redirected_user(){
if(
isset($_GET['law'])
&& $_GET['law'] == 1
&& ((isset($_COOKIE['cookie_level']) && in_array($_COOKIE['cookie_level'], ['12', '123'])) || LC_ALLOW_COOKIE_POPUP == false)
&& ((isset($_COOKIE['cookie_level']) &&(strpos($_COOKIE['cookie_level'], '2') !== false)) || LC_ALLOW_COOKIE_POPUP == false)
){
$cookieDomain = (LAWCARTA_ENVIRONMENT_NAME == 'local') ? 'livecarta.loc' : 'livecarta.com';
setcookie('law_'.LAWCARTA_ENVIRONMENT_NAME, 1,0,"/", $cookieDomain);

View File

@@ -57,7 +57,7 @@ $scripts = [];
})(window,document,'script','dataLayer','".LC_GTM."');"]; ?>
<?php $scripts[] = ['type' => 'comment', 'source' =>'End Google Tag Manager']; ?>
<?php if(
(isset($_COOKIE['cookie_level']) && in_array($_COOKIE['cookie_level'],['13','123']))
(isset($_COOKIE['cookie_level']) &&(strpos($_COOKIE['cookie_level'], '4') !== false))
|| LC_ALLOW_COOKIE_POPUP == false
):?>
<?php foreach($scripts as $script):?>