Answer the question
In order to leave comments, you need to log in
How to set cookies in WordPress CRM?
How to set a cookie not through the function.php file but anywhere else in WordPress?
I have attached php file which works but doesn't set cookies, I did like this, it doesn't work like this:
$x = 'установлены!';
setcookie("Cookie", $x);
function set_new_cookie() {
if (!isset($_COOKIE['Cookie'])) {
$x = 'установлены!';
setcookie("Cookie", $x);
}
}
add_action( 'init', 'set_new_cookie');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question