In WooCommerce, you add the legal guarantee notice to the product page template with a “Custom HTML” block, directly below the add-to-cart button. With classic themes, a small hook in the child theme does the job.
The code for WooCommerce
<div data-garantielabel></div>
<script src="https://www.garantielabel.app/widget.js" async></script>Set further options such as display and language in the code builder.
Step by step in WooCommerce
- Open the template
In WordPress, go to Appearance → Editor → Templates and open “Single Product”. With a classic theme, skip to step 4. - Insert a block
Below the “Add to Cart with Options” block, insert a “Custom HTML” block. - Paste the code
Paste the widget code and save the template. It then applies to all product pages. - Classic theme
Without the block editor, output the code in your child theme via the hookwoocommerce_single_product_summarywith priority 35, or use a snippet plugin.
Things to know about WooCommerce
- Caching and optimisation plugins (for example those that combine JavaScript files) should not modify
widget.js. Exclude the file from optimisation if necessary. - A script in a “Custom HTML” block is only kept if your user is allowed to save custom HTML (the
unfiltered_htmlcapability, on multisite only super admins). Otherwise, load the script with a snippet plugin. - If your shop is multilingual, the widget detects the language from
<html lang>. Usedata-spracheto set it.
Legal guarantee notice in the order confirmation
According to the Commission’s guidelines, the notice should also appear in the confirmation email. You customise WooCommerce emails under WooCommerce → Settings → Emails. To add the legal guarantee notice to the order email, insert the official graphic from our download page as an image there, depending on your theme via the email templates or an email plugin. A plain link is unlikely to count as a durable medium (CJEU, Case C-49/11, Content Services); the safest way is to put the notice directly in the email as an image, text or attachment. You will find the official files on our download page.
Producer guarantee? Then add the GARAN label
If the producer gives a commercial guarantee of durability of more than two years free of charge for the whole good, the GARAN label also belongs on the product page. With the GARAN label generator you create it in seconds from years, brand and model, free and without sign-up. With a free account, you get an embed code with permanent image URLs below the finished label: you upload nothing and paste it into WooCommerce as shown above.
Prefer your own files? Then upload the full and the nested version to the media library of WooCommerce and enter the addresses in the widget code:
<div data-garantielabel
data-garan-voll="https://…/GARAN-MX-500.svg"
data-garan-klein="https://…/GARAN-MX-500-nested.svg"></div>The widget then shows the nested version below the legal guarantee notice, and one click opens the full GARAN label.
Frequently asked questions
Do I need a plugin?
No. A “Custom HTML” block is enough. Only with classic themes without the block editor is a snippet plugin or a child theme the easiest way.
Does this work with Elementor or Divi?
Yes. Both have an HTML or code element that you drag below the add-to-cart button in the product template. In Elementor, product templates require Elementor Pro (Theme Builder).
Will my shop get slower?
Hardly. The script is small, loads asynchronously and does not block page rendering.