Cookie lax append issue

If you you have been struggling to fix an issue of lax in section_id cookies.

If you have this issue on your website, 99% jQuery events stopped working which depends on this cookie section. As an example, If this error on cart page than Remove item will not be working.
Let’s find out solution for this.

First thing need to do is copy the original Magento_Customer/js/customer-data.js which is located at {root_dir}/vendor/magento/module-customer/view/frontend/web/js/customer-data.js to your active theme.

After that update below code to file.


Now save and do static content deployment using command

Working!! no more error. Cheers!!

What code we had updated is below where we for value of cookie is string or not as ideal value is json. Secondly, we replace the lax string with nothing and at last, we again convert string to json.



If like efforts, Please share, comment and subscribe for future posts and inspire more.

Leave a Reply