Browser console giving SameSite attribute cookies warning


I’m getting this warning on the browser console for my Wordpress site.

A cookie associated with a cross-site resource at was set without the SameSite attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure. You can review cookies in developer tools under Application>Storage>Cookies and see more details at and

I tried to fix the problem by adding the following codes to the child theme functions.php file, but nothing happened. I believe I am missing something, maybe an code opening or something else since I am not a PHP expert.

setcookie(‘same-site-cookie’, ‘foo’, [‘samesite’ => ‘Lax’]);
setcookie(‘cross-site-cookie’, ‘bar’, [‘samesite’ => ‘None’, ‘secure’ => true]);

Please note that I am running PHP 7.4.

Can you please help my fix this warning.

Thank you.


Your issue seems not to be related to hestia, please have a look at this thread, it will guide you to a new forum which should be the right place for your question: - forum about hosting industry

Unless you embed your wordpress in a iframe in an authenticated state it is no issue…

Hello ScIT,

Thank you for sharing this thread with me. forum is not open yet. I’ll check the link another time.

I apologize for posting something not related to hestiaCP.

Thanks again.

Hi eris,

Thank you for your support.

Its just an annoying warning I was hoping to overcome. Its not affecting the performance nor the styling of the site.