Cookie consent banners
Many stores show a cookie consent banner that blocks cookies until the visitor agrees. WC Currency Switch remembers each shopper’s currency in one small cookie. If your banner blocks it, the shopper’s currency is forgotten: a shopper in Kuwait who chose KWD is back to your default currency on the next page. To avoid this, mark the currency cookie as essential (also called necessary, strictly necessary or functional) in your consent tool. With the Must Have Cookie plugin, WC Currency Switch does this for you.
What the cookie holds#
| Detail | Value |
|---|---|
| Name | wccs_currency by default. You can change it in Cookie Name on the General tab. |
| Content | A three-letter currency code only, for example KWD. |
| Lifetime | 30 days by default. You can change it in Cookie Lifetime (days) on the General tab, from 1 to 365 days. |
| Set by | Your own site. It is a first-party cookie. |
The cookie holds no personal data, no tracking ID and no visitor ID. It only tells your shop which currency to show.
How it works#
The cookie is set in two cases:
- On the first visit, when geo detection finds the visitor’s country and picks a currency. This happens on the first page the visitor opens, before they can click anything on a consent banner.
- When the shopper picks a currency in the switcher or a currency menu.
On every page after that, the plugin reads the cookie to show prices in the right currency, including on cached pages.
If the cookie is blocked:
- geo detection does not work on the first page load;
- a currency the shopper picks does not stay when they go to the next page.
Set it up#
With Must Have Cookie#
There is nothing to do. The plugin registers its cookie as essential in Must Have Cookie, so it is never blocked. When Must Have Cookie is active, the Cookie Consent Banners box on the Integrations tab says “Must Have Cookie detected” with an AUTO label.
With another consent tool#
- Open your consent tool’s cookie list or cookie categories.
- Add a cookie named
wccs_currency(or your own name from Cookie Name). - Put it in the essential, necessary or functional category, the one that is allowed before consent.
- Save, then clear your page cache.
- Test in a private browser window: pick a currency, open another page and check that the currency stays.
The Cookie Consent Banners box on the Integrations tab gives the same advice for tools such as Complianz, CookieYes, GDPR Cookie Consent and Cookiebot. How you add a cookie differs in each tool, so follow your tool’s own guide for the exact steps.
Examples#
Banner blocks the cookie. A visitor from Germany opens your shop. Geo detection picks EUR, but the banner blocks the cookie, so the choice is not remembered. The visitor picks EUR in the switcher, and on the next page sees your default currency again.
Cookie marked as essential. The same visitor opens your shop. Geo detection picks EUR and the cookie is saved. Every page shows EUR until the visitor picks another currency or the cookie expires.
Good to know#
- If you change Cookie Name, update the name in your consent tool too. Must Have Cookie picks up the new name by itself.
- Whether this cookie counts as essential under the privacy rules that apply to you is a question for your own legal advice. This doc only explains what the cookie holds and what breaks if it is blocked.
Related docs#
- The currency cookie and price data
- How first-visit currency detection works
- How WC Currency Switch works with page caching