-
Notifications
You must be signed in to change notification settings - Fork 303
fix: update cookie consent docs #2095
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
523692f to
6dd45c3
Compare
| ``` | ||
|
|
||
| This will eventually lead to a new group being created, containing two new cookies, as well as a new cookie without a group. | ||
| This will add your cookie to the existing "Comfort Features" group in the cookie consent manager. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are many plugins that create their own consent groups. To avoid uncontrolled growth of consent groups, this example has been updated to show how you can add a cookie to an existing group.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Updates the Shopware plugin guide for registering custom cookies in the storefront cookie consent manager to reflect the Shopware 6.7+ event-based API and structured cookie objects.
Changes:
- Replace references to
CookieGroupsCollectEventwithCookieGroupCollectEvent. - Update the
services.xmlexample to register the new event class. - Replace the PHP example to add a custom
CookieEntryinto the existing “Comfort Features” cookie group using the new structs/collection approach.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Starting with Shopware 6.7, custom cookie registration works differently, according to the update guide.
See: https://github.com/shopware/shopware/blob/trunk/UPGRADE-6.7.md#refactor-of-providing-cookies
Example is based on https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Customer/Cookie/WishlistCookieCollectListener.php