Dev.to WebDev 🛠 Dev 👁 0 📖 3 min read

EU Withdrawal Button (Directive 2023/2673): How to Implement the Mandatory 2-Step Flow in Magento 2, WooCommerce & Shopify

If you maintain an e-commerce store selling to European Union consumers — whether on Magento 2, WooCommerce, Shopify, or a headless storefront — EU Directive (EU) 2023/2673 (Article 11a) introduces a strict new frontend

If you maintain an e-commerce store selling to European Union consumers — whether on Magento 2, WooCommerce, Shopify, or a headless storefront — EU Directive (EU) 2023/2673 (Article 11a) introduces a strict new frontend requirement: a mandatory, login-free, 2-step electronic Withdrawal Button alongside existing EU GPSR and Omnibus 30-day lowest price rules.

Most merchants end up stacking three separate $19–$39/month apps (adding 200KB+ of blocking JavaScript and hurting Core Web Vitals). Here is the exact technical checklist required by the directive — and how to implement all three in 7.0 KB gzipped with zero layout shift (0.00 CLS).

1. The 4 Technical Requirements of the EU Withdrawal Button (Art. 11a)

Under Directive (EU) 2023/2673, hiding a return form behind an account login or a customer-support email is no longer compliant. Your storefront must implement:

  1. Permanently Accessible & Clearly Labeled: A visible button or link labeled "Withdraw from contract" (or localized equivalent like "Vertrag widerrufen" / "Se rétracter du contrat") accessible throughout the withdrawal period.
  2. Zero Login Wall: Consumers must be able to submit their Order Number, Email, and Full Name without creating an account or signing in.
  3. 2-Step Confirmation Flow: Clicking submit cannot silently fire a request — Step 2 must present a dedicated "Confirm withdrawal" action clearly summarizing the order being withdrawn.
  4. Instant Durable Receipt: Immediately upon confirmation, the consumer must receive a durable, timestamped confirmation (e.g., downloadable/printable receipt + server-side timestamped log).

Quick Audit: Want to check if your current store passes all 7 legal requirements (Withdrawal Button + EU GPSR + Omnibus)? Run the free 30-second EU Withdrawal & GPSR Compliance Checker.

2. Don't Forget EU GPSR & Omnibus 30-Day Pricing

While touching your product templates, two other EU regulations are actively enforced on the exact same pages:

  • EU GPSR (General Product Safety Regulation): Every product page must display the Manufacturer name & postal address, the EU Responsible Person contact (if the brand is outside the EU), and any relevant safety warnings.
  • EU Omnibus Directive: Whenever you display a sale or strikethrough discount, you must display the lowest price charged in the previous 30 days.

3. Fast Implementation: 7.0 KB Open-Core Engine (EUShield)

To avoid bloating storefronts with heavy third-party bundles, I built EUShield — a zero-dependency, 7.03 KB gzipped GPL-2.0 open-core engine that handles all three EU requirements (EN / DE / FR / ES / IT built in) with 0.00 Cumulative Layout Shift.

Option A: Magento 2 (Composer — 30 Seconds)

EUShield is published on Packagist as saguntech/module-eushield:

composer require saguntech/module-eushield
php bin/magento module:enable SagunTech_EUShield
php bin/magento setup:upgrade
php bin/magento cache:flush

Then configure your language, Manufacturer, EU Responsible Person, and accent color under Stores → Configuration → SagunTech → EUShield.

Option B: Universal HTML / Shopify / Webflow / Next.js (2 Lines)

Paste before </body> (or in your theme footer):

<script>
  window.EUShieldConfig = {
    language: "en", // Supports: "en", "de", "fr", "es", "it"
    accentColor: "#4f46e5",
    endpoint: "https://studio.esmthub.com/api/v1/eushield/withdraw",
    gpsr: {
      manufacturer: "Your Brand GmbH, Friedrichstr. 123, 10117 Berlin",
      responsiblePerson: "EU Compliance Rep, [email protected]",
      safetyNotice: "CE certified. Keep away from children under 3 years."
    }
  };
</script>
<script src="https://studio.esmthub.com/cdn/eushield.min.js" defer></script>

To render the collapsible EU GPSR Product Safety Card or Omnibus 30-Day Lowest Price Badge inside any product template, drop in a lightweight data attribute:

<!-- Collapsible EU GPSR Product Safety Card -->
<div data-eushield-gpsr></div>

<!-- EU Omnibus 30-Day Lowest Price Badge -->
<div data-eushield-omnibus data-lowest-price="€49.00" data-currency="EUR"></div>

Option C: WordPress & WooCommerce

Enqueue the lightweight eushield.min.js via wp_enqueue_script (or install our standalone GPL-2.0 WordPress plugin with admin settings under Settings → EUShield for language, GPSR manufacturer details, and accent color — zero hardcoded <script> tags).

4. Performance & Cost Comparison

Feature EUShield (Open-Core) 3 Separate SaaS Apps Custom Agency Build
Gzipped JS Size 7.0 KB ~180+ KB combined Varies
Core Web Vitals (CLS) 0.00 CLS Often shifts layout Varies
2-Step Withdrawal + Receipt Built-in (EN/DE/FR/ES/IT) Separate $29/mo app $1,500+ dev cost
EU GPSR Product Card Built-in Separate $19/mo app Manual metafields
Omnibus 30-Day Price Badge Built-in Separate $19/mo app Custom theme code
Pricing Free GPL-2.0 core (Pro $9.99/mo) $67–$90+/mo $1,500+

Live Demo & Free Tools

If you're updating EU storefronts for Directive 2023/2673 or GPSR, feel free to drop questions or edge cases in the comments!

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.