Browser console giving SameSite attribute cookies warning

Hello,

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

A cookie associated with a cross-site resource at https://www.google.com/ 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 Chrome Platform Status and Chrome Platform Status.

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.

Hi

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: Serverz.net - forum about hosting industry

https://core.trac.wordpress.org/ticket/37000

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.

Serverz.net 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.